chore(beads): close the cleared gateway review beads and shipped work
This commit is contained in:
1 parent
de1a899072
commit
76e2464278
2 files changed
+17
-9
No files matched your search
@@ -244,3 +244,11 @@
|
||||
{"id":"int-fdf0265456d2f378d6d26948e61e2aff","kind":"field_change","created_at":"2026-08-04T12:25:27.498290224Z","actor":"Sam Catlow","issue_id":"archie-core-6e0","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}}
|
||||
{"id":"int-28c9cc5292bd7ac7dc4b655b57edf8f0","kind":"field_change","created_at":"2026-08-04T12:25:27.885008748Z","actor":"Sam Catlow","issue_id":"archie-core-i6q","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}}
|
||||
{"id":"int-b47373a147adbb99b00f6eae652ebcff","kind":"field_change","created_at":"2026-08-04T12:25:28.265789043Z","actor":"Sam Catlow","issue_id":"archie-core-la1","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}}
|
||||
{"id":"int-9ff3ed9dcf6e448a81df008815e8eb8e","kind":"field_change","created_at":"2026-08-04T12:48:07.637756274Z","actor":"Sam Catlow","issue_id":"archie-core-b4i","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
|
||||
{"id":"int-7255404c7c20506786e2b078da5057df","kind":"field_change","created_at":"2026-08-04T12:48:08.009222426Z","actor":"Sam Catlow","issue_id":"archie-core-0ua","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
|
||||
{"id":"int-616cf0b91be6940f73463e75a55458d7","kind":"field_change","created_at":"2026-08-04T12:48:08.392664077Z","actor":"Sam Catlow","issue_id":"archie-core-gih","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
|
||||
{"id":"int-df8617cb487d97af587b3f9f77e29944","kind":"field_change","created_at":"2026-08-04T12:48:08.788683014Z","actor":"Sam Catlow","issue_id":"archie-core-963","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
|
||||
{"id":"int-2ae0ebee849143716e348170cadf0857","kind":"field_change","created_at":"2026-08-04T12:48:09.176704811Z","actor":"Sam Catlow","issue_id":"archie-core-rml","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
|
||||
{"id":"int-3be21f823391c1ca4f895e87e456dc3f","kind":"field_change","created_at":"2026-08-04T12:48:09.558765245Z","actor":"Sam Catlow","issue_id":"archie-core-12n","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
|
||||
{"id":"int-0acabfbc83fa1bd117fca76693a7846c","kind":"field_change","created_at":"2026-08-04T12:48:09.945490827Z","actor":"Sam Catlow","issue_id":"archie-core-iyx","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
|
||||
{"id":"int-ada12b543691cdbcf87cc50c0ee0f3ff","kind":"field_change","created_at":"2026-08-04T12:48:10.334971684Z","actor":"Sam Catlow","issue_id":"archie-core-8u8.2","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}}
|
||||
+9
-9
@@ -1,7 +1,7 @@
|
||||
{"_type":"issue","id":"archie-core-cz8","title":"fix(gateway): /compress destroys message identity, breaking dedup permanently","description":"applyCompress (session_commands.go:561-573) rebuilds retained head/tail turns as bare Message{From, Text}, dropping MessageID, SourceID and At. newMessageID with an empty SourceID returns a random UUID, so every protected message is deleted and re-inserted under a new identity with source_id NULL and _ts reset to now.\n\nCONFIRMED by two independent reviewers, executed on BOTH backends. Before compress, redelivering tg-59 is a correct no-op (60 stays 60). After compress the same redelivery duplicates (24 -\u003e 25). So archie-core-963's whole guarantee survives only until the first /compress -- after that, a Telegram 24h backlog replay on restart appends every surviving message a second time.\n\nAlso violates messaging-and-work-intake.md:88-90 (immutable application-generated MessageID) and 112-114 (immutable records), and dangles any branch-point correlation to the old IDs.\n\nBlocks archie-core-963 and archie-core-0ua.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:00:51Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:25:25Z","started_at":"2026-08-03T16:13:11Z","closed_at":"2026-08-04T12:25:25Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8u8","title":"feat(gateway): migrate canonical session/message store to SQLite","description":"docs/architecture/messaging-and-work-intake.md:107 requires the canonical session and message implementation to supply durable SQLite round trips. The current store is NellDB-backed.\n\nScope is the SETTLED parts of the messaging architecture only:\n- SQLite persistence (modernc.org/sqlite; FTS5 verified available at 3.53.3, no CGo)\n- application-generated canonical MessageID, platform IDs as correlation only (doc 88-90)\n- immutable message records (doc 112-114)\n- append-only linear sequence per conversation (doc 128)\n- real transactions for ReplaceMessages and Delete\n\nExplicitly OUT of scope: the rich typed-content / tool-call / tool-result model and delivery-attempt semantics. docs/architecture/messaging-and-work-intake.md:273-284 lists the canonical inbound message model, source-correlation model, and outbound delivery/retry/dedup semantics as DECISIONS STILL REQUIRED, so they are not specified enough to implement. That work belongs to archie-core-abg.16.\n\nDecision by Sam 2026-08-03 after the third review surfaced that the NellDB-vs-SQLite question was already settled by the architecture docs.","notes":"SQLite SessionStore implemented and verified 2026-08-03. Not yet wired into production.\n\nAdded (no existing production file touched):\n- internal/gateway/session_store_sqlite.go -- SessionStore on modernc.org/sqlite. Real sql.Tx for ReplaceMessages and Delete, which is the actual reason for the migration: /compress gets genuine atomicity instead of the write-then-delete approximation the NellDB path needs. FTS5 external-content index (content='messages', content_rowid='id') kept in sync by AFTER INSERT/UPDATE/DELETE triggers, so sync is enforced by the schema and no Go code path can forget it.\n- internal/gateway/sessionstore_conformance_test.go -- runSessionStoreSuite(t, newStore), the backend-agnostic contract.\n- Conformance hooks for both backends.\n\nVERIFIED, not taken on trust:\n- 19 identical subtest groups pass against BOTH backends. The suite is the migration gate.\n- FTS index does not drift: search and count stay equal through delete (5-\u003e3), replace (-\u003e1) and session delete (-\u003e0); no cross-session leak.\n- FTS5 syntax injection neutralised: 'text:hello', '\"unbalanced', 'NEAR(a b)', '*', 'needle OR elsewhere' all return 0 hits with no error, confirming terms are escaped phrases AND'ed rather than operators.\n\nBehavioural differences from NellDB, both improvements:\n- MessagePage.Truncated is always false. SQLite gives an exact COUNT(*), so the MaxTextSearchLimit ceiling that field exists to describe does not apply.\n- SourceID is persisted and round-trips; the NellDB path derives the canonical ID from it but never stores it.\n\nCleanup: the two agents ran in parallel, so the SQLite implementation shipped 22 standalone tests written before the suite existed. 18 duplicated suite coverage and were removed (701 -\u003e 170 lines); the 4 kept are genuinely SQLite-specific (transaction atomicity, Truncated semantics, error paths, file creation).\n\ntask check clean, golangci-lint ./internal/gateway/... 0 issues, -race clean.\n\nREMAINING: wire cmd/archied over (config switch), decide the NellDB path's retirement, adversarial review of the combined diff.","status":"open","priority":0,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-03T10:03:05Z","created_by":"Sam Catlow","updated_at":"2026-08-03T11:54:41Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-0ua","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.","notes":"ADVERSARIAL PASS 2026-08-04 (fresh reviewer). Does NOT close.\n\nCore claim HELD on both backends: ReplaceMessages writes before deleting, cannot delete a record it just wrote, and an injected failure leaves the full 60-message history intact with the error propagated. Two concurrent /compress runs end with exactly 24 messages and one summary. No error swallowing remains on this path.\n\nBLOCKED BY: archie-core-8k8 (bare /compress can NEVER apply -- the failure-safe path this bead added is unreachable via the documented command), archie-core-6e0 (mid-compress inbound message destroyed, unrecoverable, window is in the caller), archie-core-cz8 (compress re-mints identity), archie-core-7ve (applyCompress has zero test coverage; the NellDB failure-safety test never induces a failure).","status":"open","priority":0,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-03T09:25:26Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:02:25Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-b4i","title":"fix(gateway): chronological message ordering — _ts + per-session collections","description":"SaveMessages keys from i=0 and overwrites the first N messages of any non-empty session (verified: m0/m1 destroyed by a bulk save). SaveMessage derives seq from len(rows) so deletes cause key reuse. The 'at' timestamp is written and never read; ordering is by insertion counter, not time.\n\nFix: add Message.At, write nell.TimestampField (_ts), give each session its own NellDB collection (a room IS a collection), key messages by time-ordered unique IDs, and order/page via sdk.ScanSince. Clean break on existing data (carina is a testing ground).","notes":"ADVERSARIAL PASS 2026-08-04 (fresh reviewer, no knowledge of the implementation). Does NOT close.\n\nThe bead's own claims HELD under heavy probing: _ts is a bare JSON number on every write path (raw payload inspected; searching '2026' matches nothing), the clamp survives restart and a backwards clock, 32 concurrent saves to one session produce no duplicate _ts, paging over 2500 messages drops and duplicates nothing at boundaries and terminates on a short page, Truncated reflects the result set not the request, and per-session collection names need no sanitisation (nell.CompositeKey is byte-length-prefixed and provably injective; 5000-char, NUL-embedded and ../../ session IDs all round-trip).\n\nBLOCKED BY: archie-core-7s3 (List/GetByChannel are not newest-first, so the ordering this bead establishes inside a session is undone by picking the wrong session on restart), archie-core-cz8 (/compress re-mints identity and timestamps), archie-core-le6 items 4-6.\n\nAlso confirmed: /branch inherits parent MessageIDs so the session-scoped derivation never runs for branched history (see archie-core-la1).","status":"open","priority":0,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-03T02:27:48Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:02:25Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-b4i","title":"fix(gateway): chronological message ordering — _ts + per-session collections","description":"SaveMessages keys from i=0 and overwrites the first N messages of any non-empty session (verified: m0/m1 destroyed by a bulk save). SaveMessage derives seq from len(rows) so deletes cause key reuse. The 'at' timestamp is written and never read; ordering is by insertion counter, not time.\n\nFix: add Message.At, write nell.TimestampField (_ts), give each session its own NellDB collection (a room IS a collection), key messages by time-ordered unique IDs, and order/page via sdk.ScanSince. Clean break on existing data (carina is a testing ground).","notes":"ADVERSARIAL PASS CLEARED 2026-08-04. All blockers fixed and committed:\n- archie-core-7s3 (resolve/List newest-first) -\u003e 740ec50\n- archie-core-8u8.2 (both backends agree on recency) -\u003e 02a3630\n- archie-core-cz8 (/compress no longer re-mints identity or timestamps) -\u003e cf74d9c\nThe bead's own claims were verified by execution and held: _ts numeric on every write path, clamp survives restart and a backwards clock, 32 concurrent saves produce no duplicate _ts, paging over 2500 messages is lossless, per-session collection names need no sanitisation.","status":"open","priority":0,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-03T02:27:48Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:48:06Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-ci3","title":"Telegram chat replies use stale and reordered session context","description":"Live Telegram conversation shows replies answering earlier user messages and replayed user history in non-chronological order. Trace ingestion, turn lanes, Nell persistence/history ordering, prompt construction, and response routing to identify the production cause.","acceptance_criteria":"Root cause is demonstrated with code path, live evidence, and a focused reproducer; affected ordering contract and correct fix seam are identified.","notes":"2026-08-03: Ordering half is FIXED by upgrading NellDB to v0.3.0 (go.mod v0.2.5 -\u003e v0.3.0). The ci3 17-message reproducer now passes: position 0 is seq 00 and all 17 are in order via the existing AllDocs path. No archie-core code change was required for the ordering defect — v0.3.0 gives List/AllDocs a deterministic (WallTime, Counter, collection, ID) order, which is exactly the unsorted-map root cause recorded above.\n\nStill open, tracked in archie-core-b4i (separate defect, not an ordering bug): SaveMessages keys from i=0 and destroys the first N messages of a non-empty session, and SaveMessage derives seq from len(rows) so deletes cause key reuse. Verified by reproducer.","status":"closed","priority":0,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-31T05:15:30Z","created_by":"Sam Catlow","updated_at":"2026-08-03T09:02:41Z","started_at":"2026-07-31T05:15:40Z","closed_at":"2026-08-03T09:02:41Z","close_reason":"Fixed by upgrading NellDB v0.2.5 -\u003e v0.3.0 (go.mod). Root cause as recorded: v0.2.5 sdk.DocDB.AllDocs consumed Store.List without sorting and LogStore.List iterated a map. v0.3.0 gives List/AllDocs a deterministic (WallTime, Counter, collection, ID) order.\n\nVerified with the 17-message reproducer from this issue: position 0 is now seq 00 and all 17 return in order. No archie-core code change was needed for the ordering defect itself.\n\nThe wider blast radius noted on this issue (prompt history, /undo, /retry, branch/resume copying, search ordering) is covered by the internal/gateway migration in archie-core-b4i, which moves message history onto _ts + per-session collections + ScanSince paging. Session list ordering is unchanged and still sorts newest-first in listAllLocked.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-abg.16.33","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.","acceptance_criteria":"Allowlist 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":0,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-26T19:11:40Z","created_by":"Sam Catlow","updated_at":"2026-07-26T19:15:22Z","closed_at":"2026-07-26T19:15:22Z","close_reason":"Shipped in cec0f3e. 16.33: chat.telegram.allowed_user_ids plumbed through config; empty list now DENIES (was: allowed everyone); matches sender from.id not chat id so groups cannot inherit access; rejections logged with sender id; startup warns on empty list. Old TestIsChatAllowed asserted the vulnerable fail-open behaviour and was replaced with fail-closed tests. Sam's id 1312197967 added to carina's config.toml before push. 16.34: SetMyCommands publishes the command list Router actually handles; non-fatal on failure.","dependencies":[{"issue_id":"archie-core-abg.16.33","depends_on_id":"archie-core-abg.16","type":"parent-child","created_at":"2026-07-27T05:11:40Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-abg.17.41","title":"Tool-provider engine: lifecycle registry with MCP and memory providers","description":"Build the typed tool-provider capability family over the central tools registry. Providers declare a plugin manifest, lifecycle/health, and discover executable ToolEntry values. Add adapters for memory.Manager and configured MCP servers, perform MCP initialize/tools-list/tools-call, register handlers atomically with collision rollback, translate available entries to ai-sdk core.ToolSet, and wire consumers so registered tools are actually callable rather than dead daemon fields.","design":"internal/tools owns Provider and ProviderRegistry; Provider is a typed domain contract and uses the shared plugin manifest/lifecycle vocabulary. The registry owns provider registration and tool indexing while the capability host orchestrates cross-family lifecycle. Memory is adapted without changing internal/memory concurrent work. MCP provider wraps the existing stdio transport without modifying its concurrent implementation, adds protocol client behavior in new files, prefixes/sanitizes server tool names deterministically, and retains original MCP names for calls. Never advertise a tool on an execution path that cannot invoke its handler; explicitly proxy or omit tools across subprocess/NATS boundaries.","acceptance_criteria":"Provider registration is atomic and rejects duplicate provider/tool IDs without partial state. Start/discovery failure rolls back tools and lifecycle; stop removes availability and shuts providers down in reverse order. Memory provider tools appear in the central registry and execute through memory.Manager. A fake MCP server proves initialize, initialized notification where supported, tools/list discovery, tools/call execution, JSON-RPC errors, shutdown, and name mapping. Available tools convert to valid ai-sdk core.ToolSet and are used by the gateway conversational loop and supported agent execution paths; unsupported remote paths do not advertise unusable handlers. Configuration creates providers through typed factories. Focused/race tests, lint, task check, and fresh adversarial review pass subject only to documented concurrent baseline failures.","notes":"Implemented typed provider.Engine + provider.Registry capability family; atomic central RegisterBatch/Unregister; dependency-ordered start/discovery, bounded rollback, retryable failed cleanup, reverse stop and health aggregation. Added memory.Manager adapter and lifecycle-managed MCP adapter with initialize/list/call, deterministic ASCII name mapping, original-name dispatch, tool errors, resource text and multimodal preservation. Composition uses typed config factory, omits unsupported HTTP/unknown transports, registers the family with capabilityHost, defers gateways until host+daemon startup, shuts memory down, builds validated ai-sdk ToolSets, uses independent 8-step chat loop, and exposes handlers only to Telegram chat/in-process agents. Focused race tests pass; scoped lint 0; fresh final adversarial review 0 findings. task check passes every package except known concurrent internal/gateway /spawn tests. Dependency abg.17.16 remains independently in progress.\nImplementation and review are complete; Beads closure is intentionally deferred because required transport issue archie-core-abg.17.16 is still open. Close without --force when that dependency completes.","status":"closed","priority":0,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-26T05:11:10Z","created_by":"Sam Catlow","updated_at":"2026-07-26T17:44:51Z","started_at":"2026-07-26T06:22:50Z","closed_at":"2026-07-26T17:44:51Z","close_reason":"Blocking dependency abg.17.16 closed; tool-provider engine work was already implementation-complete and previously reviewed clean.","dependencies":[{"issue_id":"archie-core-abg.17.41","depends_on_id":"archie-core-abg.17","type":"parent-child","created_at":"2026-07-26T15:11:09Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-abg.17.41","depends_on_id":"archie-core-abg.40","type":"blocks","created_at":"2026-07-26T15:11:17Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-abg.17.41","depends_on_id":"archie-core-abg.17.16","type":"blocks","created_at":"2026-07-26T15:11:18Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":2,"dependent_count":0,"comment_count":0}
|
||||
@@ -58,12 +58,12 @@
|
||||
{"_type":"issue","id":"archie-core-abg.18","title":"[EPIC] Memory: pluggable provider architecture with file-backed persistence","description":"Pluggable memory system to match Hermes parity:\\n\\n1. **MemoryProvider interface**: Abstract interface with methods for initialize(), get_tool_schemas(), prefetch(), sync_turn(), and optional lifecycle hooks (on_session_end, on_session_switch, on_pre_compress, on_memory_write).\\n\\n2. **Built-in file-backed memory**: MEMORY.md and USER.md stored per-session/profile. LLM-callable memory tool with add/replace/remove actions. Frozen snapshot at session start (preserves prefix cache), immediate disk write on updates. Section-sign delimited entries with substring matching.\\n\\n3. **MemoryManager**: Orchestrates built-in + at most one external provider. Background serialized write executor. Prefetch with timeout (8s). Streaming context scrubber that strips injected memory spans from model output.\\n\\nRef: docs/prds/hermes-gap-analysis.md section 4","acceptance_criteria":"An external memory provider (e.g. Honcho, Mem0) can be plugged in via config. The built-in memory tool persists across sessions. Conversation context is recalled on session resume.","status":"closed","priority":0,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-07-25T14:02:22Z","created_by":"Sam Catlow","updated_at":"2026-07-28T17:04:41Z","closed_at":"2026-07-28T17:04:41Z","close_reason":"Superseded by merged work: all 32 children complete (32/32, bd flags it 'eligible for close'). MemoryProvider interface, built-in file-backed memory, MemoryManager, scrubber, drain and threat scanning all landed in internal/memory. Nothing left in scope.","dependencies":[{"issue_id":"archie-core-abg.18","depends_on_id":"archie-core-abg","type":"parent-child","created_at":"2026-07-26T00:02:22Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-abg.16","title":"[EPIC] Gateway: rich message model, adapter lifecycle, session management","description":"Foundational gateway infrastructure to match Hermes parity. Three interdependent pieces:\\n\\n1. **Message model**: Replace the 3-field Message struct with a rich MessageEvent (MessageType enum: text/photo/video/audio/voice/document/sticker/command, media_urls, reply_to context, metadata dict, source). This is the wire type every adapter produces.\\n\\n2. **Adapter lifecycle**: Replace the 3-method Gateway interface with a BasePlatformAdapter interface: connect()/disconnect()/send() as required methods, plus optional overrides for typing indicators, edit/delete, image/voice/video/document send, interactive UX (clarify buttons, approval dialogs). Capability flags (supports_code_blocks, splits_long_messages, supports_async_delivery).\\n\\n3. **Session management**: SessionSource struct (platform, chat_id, chat_type, user_id, thread_id, guild_id, profile), AsyncSessionStore for persistent session storage, SessionContext for system prompt injection.\\n\\nAll three blocks together enable adding new platforms as plugins without touching core gateway code.\\n\\nRef: docs/prds/hermes-gap-analysis.md sections 1-2","acceptance_criteria":"New adapters can be added by implementing a Go interface with connect/disconnect/send + optional media methods. Messages carry full metadata through the pipeline. Sessions persist across gateway restarts.","status":"open","priority":0,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-07-25T14:02:21Z","created_by":"Sam Catlow","updated_at":"2026-07-25T14:02:21Z","dependencies":[{"issue_id":"archie-core-abg.16","depends_on_id":"archie-core-abg","type":"parent-child","created_at":"2026-07-26T00:02:21Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-jfg","title":"Spawned archie-agent containers not on daemon's docker network — can't reach NATS","description":"Root cause of 'agent still failing on the server': archied's container.Pool.Acquire creates archie-agent containers via the Docker SDK with no NetworkMode set, so Docker attaches them to the default bridge network. archied and nats run on the compose-created 'archie-core_default' network instead, so the spawned container's hostname resolution for 'nats' (from NATS_URL=nats://nats:4222) fails and archie-agent can't connect. Confirmed on carina host logs: archied logs show repeating 'taskrun request failed err=\"nats: no responders available for request\"' for every task, containers created and destroyed within ~1.5s (consistent with archie-agent's NATS client failing fast). Fixed by detecting the daemon's own container's network in NewPool (selfNetwork, via ContainerInspect on os.Hostname()) and setting HostConfig.NetworkMode on spawned containers to match.","status":"closed","priority":0,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-07-24T03:10:26Z","created_by":"Sam Catlow","updated_at":"2026-07-25T13:04:34Z","closed_at":"2026-07-25T13:04:34Z","close_reason":"Fix already implemented and verified: selfNetwork() in internal/container/pool.go detects the daemon's own container network via ContainerInspect(os.Hostname()) and Acquire() sets HostConfig.NetworkMode to match, so spawned archie-agent containers join the same compose network as nats. Build and internal/container tests pass.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-x35","title":"fix(gateway): resolve() orphans a session when it loses the double-check race","description":"CONFIRMED by execution with a blocking store decorator. sessionTracker.resolve calls sessions.Save BEFORE cacheActive, which may then discard the ID in favour of a racing caller's. The write is not rolled back.\n\nInterleaving: goroutine A misses the cache and GetByChannel returns empty; meanwhile /new saves a UUID session and setActives it; A resumes, saves the deterministic session 'chat-y', then cacheActive returns the UUID. Store holds 2 sessions; 'chat-y' is unreachable, shows up in /sessions and /topic listings as '(untitled)', and per the newest-first bug can be silently resurrected on restart.\n\nApplies equally to a racing /resume, /branch or /topic \u003cid\u003e -- the daemon genuinely runs commands on lane goroutines while submitTurn resolves on the bot worker.\n\nNote the synchronization itself is correct: all four accesses to sessionTracker.active are guarded, and stripping the locks produces 12 race-detector reports plus an assertion failure, so the test is load-bearing. This is a logic bug inside the guarded code, not a race.","status":"in_progress","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:31Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:15:33Z","started_at":"2026-08-04T12:15:33Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-i6q","title":"fix(gateway): redelivery dedups the stored turn but still re-runs the model","description":"archie-core-963 made SaveMessage idempotent, but nothing upstream consults the result. cmd/archied/telegram_setup.go:158 respond() calls SaveMessage (now a no-op on redelivery) then unconditionally loads history, calls the model, and saves the reply -- which carries no SourceID, so it always gets a fresh random ID and always appends.\n\nCONFIRMED at store level on both backends: redelivering tg-1 leaves [ping, pong, pong], plus a second billed model turn with any tool side effects executed twice.\n\nThe bead's stated problem ('a re-delivered Telegram update appends a duplicate turn') is half fixed. SaveMessage returns no already-seen signal for the caller to act on.","status":"in_progress","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:30Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:21:24Z","started_at":"2026-08-04T12:21:24Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-jex","title":"fix(gateway): /topic off poisons the tracker cache with an empty session ID","description":"CONFIRMED by execution. handleTopic (session_commands.go:200) 'off' does setActive(chan, \"\", getActive(chan, threadID)). With no session cached for (chan, threadID), getActive returns \"\" and that empty string is stored. resolve treats map presence as authoritative ('id, ok := t.active[key]; if ok { return id }'), and cacheActive also returns the empty existing value, so nothing can repair it.\n\nReachable when /topic off is the first message on the webhook (webhook.go:169) or email (email.go:207) channel -- both call router.Route directly and never call ResolveSessionKey first, unlike telegram's submitTurn.\n\nBlast radius: every later message in that chat persists under session ID \"\", history is shared with any other poisoned chat, and the turn-lane key becomes \"\" so /stop in one chat kills a turn in another.\n\nSame line is also non-atomic: setActive(...getActive(...)) is two critical sections, so a concurrent /resume or /branch is silently clobbered.","status":"in_progress","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:18Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:14:00Z","started_at":"2026-08-04T12:14:00Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-7s3","title":"fix(gateway): session resolution is not newest-first, so restart resumes a stale session","description":"Found independently by two reviewers, CONFIRMED by execution.\n\nsessionTracker.resolve (session_commands.go:54-59) comments 'Find the most recent session matching this thread and bot' but returns the first element GetByChannel yields. The wired-up NellDB store returns document-ID order (listAllLocked reverses AllDocs, which sorts by document ID), i.e. UUID-lexicographic -- effectively random. LastActiveAt is populated on every record and never consulted.\n\nScenario: user runs /new 'old', chats, runs /new 'current'; daemon restarts (the tracker cache is in-memory only); the next message resolves to whichever session sorts first. Probed over 10 runs: 4 landed in the OLDER session, answering against pre-/new history. This is the user-visible lost-context class.\n\nAlso a silent backend divergence: SQLite's GetByChannel orders created_at DESC, NellDB does not, and the shared conformance suite does not pin it. Separately, SessionStore.List's doc comment (session_store.go:34-36) promises newest-first and does not deliver: saving zzz-oldest, aaa-middle, mmm-newest returns [zzz-oldest mmm-newest aaa-middle].\n\nBlocks archie-core-b4i and archie-core-gih.","status":"in_progress","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:17Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:12:02Z","started_at":"2026-08-04T12:12:02Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-6e0","title":"fix(gateway): a message arriving mid-/compress is destroyed","description":"applyCompress reads MessageCount then RecentMessages, and ReplaceMessages later removes everything outside the replacement set. A chat turn that lands between the read and the replace is deleted, never summarised.\n\nCONFIRMED executed on both backends: 'nell: mid-compress inbound message destroyed (stored=24)', 'sqlite: ... (stored=24)'. NellDB deletes it via the AllDocs snapshot; SQLite via DELETE ... WHERE message_id NOT IN (survivors), a survivor-complement.\n\narchie-core-0ua's guarantee (worst case is recoverable duplicates) does not cover this: it is unrecoverable loss, and the store-level fix cannot address it because the window is in the caller. Nothing serialises /compress against an inbound turn.","status":"in_progress","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:02Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:17:57Z","started_at":"2026-08-04T12:17:57Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8k8","title":"fix(gateway): /compress argument dispatch is wrong in three ways","description":"session_commands.go:460-478, all CONFIRMED by execution:\n\n1. Bare /compress can never apply. isPreview is 'len(fields) == 0 || --preview || --dry-run', so /compress with no arguments takes the preview branch -- and compressPreview ends with 'Run /compress to apply'. The command tells the user to run a command that does nothing, forever. The failure-safe ReplaceMessages path added by archie-core-0ua is unreachable via the documented command; only '/compress here \u003cN\u003e' reaches it.\n\n2. /compress focus \u003ctopic\u003e silently ignores the topic. focus is validated for arity only; cfg is never modified, so it runs a full default compression and reports success. Irreversible history rewrite from a command the user believes does something narrower.\n\n3. /compress here (no N) and any unrecognised argument (/compress asdf) fall through to a full default compression rather than printing usage, unlike the sibling focus branch.","status":"in_progress","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:02Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:08:49Z","started_at":"2026-08-04T12:08:49Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-x35","title":"fix(gateway): resolve() orphans a session when it loses the double-check race","description":"CONFIRMED by execution with a blocking store decorator. sessionTracker.resolve calls sessions.Save BEFORE cacheActive, which may then discard the ID in favour of a racing caller's. The write is not rolled back.\n\nInterleaving: goroutine A misses the cache and GetByChannel returns empty; meanwhile /new saves a UUID session and setActives it; A resumes, saves the deterministic session 'chat-y', then cacheActive returns the UUID. Store holds 2 sessions; 'chat-y' is unreachable, shows up in /sessions and /topic listings as '(untitled)', and per the newest-first bug can be silently resurrected on restart.\n\nApplies equally to a racing /resume, /branch or /topic \u003cid\u003e -- the daemon genuinely runs commands on lane goroutines while submitTurn resolves on the bot worker.\n\nNote the synchronization itself is correct: all four accesses to sessionTracker.active are guarded, and stripping the locks produces 12 race-detector reports plus an assertion failure, so the test is load-bearing. This is a logic bug inside the guarded code, not a race.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:31Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:25:27Z","started_at":"2026-08-04T12:15:33Z","closed_at":"2026-08-04T12:25:27Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-i6q","title":"fix(gateway): redelivery dedups the stored turn but still re-runs the model","description":"archie-core-963 made SaveMessage idempotent, but nothing upstream consults the result. cmd/archied/telegram_setup.go:158 respond() calls SaveMessage (now a no-op on redelivery) then unconditionally loads history, calls the model, and saves the reply -- which carries no SourceID, so it always gets a fresh random ID and always appends.\n\nCONFIRMED at store level on both backends: redelivering tg-1 leaves [ping, pong, pong], plus a second billed model turn with any tool side effects executed twice.\n\nThe bead's stated problem ('a re-delivered Telegram update appends a duplicate turn') is half fixed. SaveMessage returns no already-seen signal for the caller to act on.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:30Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:25:28Z","started_at":"2026-08-04T12:21:24Z","closed_at":"2026-08-04T12:25:28Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-jex","title":"fix(gateway): /topic off poisons the tracker cache with an empty session ID","description":"CONFIRMED by execution. handleTopic (session_commands.go:200) 'off' does setActive(chan, \"\", getActive(chan, threadID)). With no session cached for (chan, threadID), getActive returns \"\" and that empty string is stored. resolve treats map presence as authoritative ('id, ok := t.active[key]; if ok { return id }'), and cacheActive also returns the empty existing value, so nothing can repair it.\n\nReachable when /topic off is the first message on the webhook (webhook.go:169) or email (email.go:207) channel -- both call router.Route directly and never call ResolveSessionKey first, unlike telegram's submitTurn.\n\nBlast radius: every later message in that chat persists under session ID \"\", history is shared with any other poisoned chat, and the turn-lane key becomes \"\" so /stop in one chat kills a turn in another.\n\nSame line is also non-atomic: setActive(...getActive(...)) is two critical sections, so a concurrent /resume or /branch is silently clobbered.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:18Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:25:27Z","started_at":"2026-08-04T12:14:00Z","closed_at":"2026-08-04T12:25:27Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-7s3","title":"fix(gateway): session resolution is not newest-first, so restart resumes a stale session","description":"Found independently by two reviewers, CONFIRMED by execution.\n\nsessionTracker.resolve (session_commands.go:54-59) comments 'Find the most recent session matching this thread and bot' but returns the first element GetByChannel yields. The wired-up NellDB store returns document-ID order (listAllLocked reverses AllDocs, which sorts by document ID), i.e. UUID-lexicographic -- effectively random. LastActiveAt is populated on every record and never consulted.\n\nScenario: user runs /new 'old', chats, runs /new 'current'; daemon restarts (the tracker cache is in-memory only); the next message resolves to whichever session sorts first. Probed over 10 runs: 4 landed in the OLDER session, answering against pre-/new history. This is the user-visible lost-context class.\n\nAlso a silent backend divergence: SQLite's GetByChannel orders created_at DESC, NellDB does not, and the shared conformance suite does not pin it. Separately, SessionStore.List's doc comment (session_store.go:34-36) promises newest-first and does not deliver: saving zzz-oldest, aaa-middle, mmm-newest returns [zzz-oldest mmm-newest aaa-middle].\n\nBlocks archie-core-b4i and archie-core-gih.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:17Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:25:26Z","started_at":"2026-08-04T12:12:02Z","closed_at":"2026-08-04T12:25:26Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-6e0","title":"fix(gateway): a message arriving mid-/compress is destroyed","description":"applyCompress reads MessageCount then RecentMessages, and ReplaceMessages later removes everything outside the replacement set. A chat turn that lands between the read and the replace is deleted, never summarised.\n\nCONFIRMED executed on both backends: 'nell: mid-compress inbound message destroyed (stored=24)', 'sqlite: ... (stored=24)'. NellDB deletes it via the AllDocs snapshot; SQLite via DELETE ... WHERE message_id NOT IN (survivors), a survivor-complement.\n\narchie-core-0ua's guarantee (worst case is recoverable duplicates) does not cover this: it is unrecoverable loss, and the store-level fix cannot address it because the window is in the caller. Nothing serialises /compress against an inbound turn.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:02Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:25:27Z","started_at":"2026-08-04T12:17:57Z","closed_at":"2026-08-04T12:25:27Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8k8","title":"fix(gateway): /compress argument dispatch is wrong in three ways","description":"session_commands.go:460-478, all CONFIRMED by execution:\n\n1. Bare /compress can never apply. isPreview is 'len(fields) == 0 || --preview || --dry-run', so /compress with no arguments takes the preview branch -- and compressPreview ends with 'Run /compress to apply'. The command tells the user to run a command that does nothing, forever. The failure-safe ReplaceMessages path added by archie-core-0ua is unreachable via the documented command; only '/compress here \u003cN\u003e' reaches it.\n\n2. /compress focus \u003ctopic\u003e silently ignores the topic. focus is validated for arity only; cfg is never modified, so it runs a full default compression and reports success. Irreversible history rewrite from a command the user believes does something narrower.\n\n3. /compress here (no N) and any unrecognised argument (/compress asdf) fall through to a full default compression rather than printing usage, unlike the sibling focus branch.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:02Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:25:26Z","started_at":"2026-08-04T12:08:49Z","closed_at":"2026-08-04T12:25:26Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-rml","title":"fix(memory): startup accepted an unusable memory directory","description":"cmd/archied/main.go builds the builtin memory provider at filepath.Join(cfg.WorkDir, \"memory\") and logs 'memory manager started' regardless of whether that path exists or is writable. builtin.NewStore treats ENOENT as an empty document and Reload does the same, so a missing directory is indistinguishable from a memory with nothing in it yet.\n\nFound live: carina's config was copied to the laptop with work_dir = /var/lib/archie/work, a container path that does not exist here. archied logged 'memory manager started dir=/var/lib/archie/work/memory' and ran with no memory at all. The failure would only have surfaced at the agent's first memory write, when writeFileAtomic's MkdirAll hit EACCES on /var/lib -- mid-conversation, as a tool error, after startup said it was fine.\n\nFixed: builtin.New now does MkdirAll(cfg.Dir) and returns an error the operator can act on, so an unusable path fails at startup where the existing error path already exits non-zero. New's doc claimed 'the provider is ready for use as soon as New returns'; it now is.","status":"open","priority":1,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-03T16:00:07Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:00:07Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-3cf.6","title":"Restore compliance with the approved Archie visual design","description":"The current dashboard does not follow the supplied reference design. Rework the shell and page composition around the reference: a framed rounded workspace, compact top navigation, prominent welcome/header area, adjacent primary actions, getting-started panel, prominent status/compliance visualization, compact KPI strip with trend marks, forecast/projection panel, and live-runs table. Match the reference visual treatment: layered rounded surfaces, soft translucent panels, luminous abstract background treatment, compact information-dense cards, restrained status colours, and consistent icon/action placement. Do not reinterpret this as a generic dark admin console or as a light editorial marketing page. Capture desktop and narrow-viewport visual evidence before closing.","status":"open","priority":1,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-03T15:18:32Z","created_by":"Sam Catlow","updated_at":"2026-08-03T15:20:01Z","dependencies":[{"issue_id":"archie-core-3cf.6","depends_on_id":"archie-core-3cf","type":"parent-child","created_at":"2026-08-04T01:18:32Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-3cf.1","title":"Fix dashboard KPI tiles rendering blank values","description":"Authenticated runtime inspection of the supplied dashboard URL showed the first three dashboard stat tiles visually rendered with empty headline values while their comparison text was present; the Tokens used tile rendered 0. Trace the stat tile/render/update path and make every KPI display a stable value during initial load, loading, zero-data, and API-error states. Add focused regression coverage and verify against the live dashboard.","status":"open","priority":1,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-03T15:17:39Z","created_by":"Sam Catlow","updated_at":"2026-08-03T15:17:58Z","dependencies":[{"issue_id":"archie-core-3cf.1","depends_on_id":"archie-core-3cf","type":"parent-child","created_at":"2026-08-04T01:17:38Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -74,7 +74,7 @@
|
||||
{"_type":"issue","id":"archie-core-8u8.5","title":"feat(gateway): version the SQLite session schema before cutover","description":"OpenSQLiteSessionStore currently runs CREATE IF NOT EXISTS statements with no schema version or transactional migration record. Before production wiring, add the smallest deterministic schema-version mechanism so future upgrades cannot silently leave a partially evolved database.","acceptance_criteria":"A fresh database records the current schema version; opening a supported older fixture migrates transactionally and preserves data; unsupported newer versions fail with an actionable error; migration failure leaves the prior schema/data usable; schema initialization and upgrades are covered by file-backed tests.","status":"open","priority":1,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-03T12:34:39Z","created_by":"Sam Catlow","updated_at":"2026-08-03T12:34:39Z","dependencies":[{"issue_id":"archie-core-8u8.5","depends_on_id":"archie-core-8u8","type":"parent-child","created_at":"2026-08-03T22:34:38Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8u8.3","title":"fix(gateway): round-trip SourceID through every SessionStore backend","description":"SQLite persists and returns Message.SourceID, but the NellDB adapter derives MessageID from SourceID and then discards SourceID from the stored document. External correlation metadata therefore changes across backend selection and cannot be exported from NellDB during migration.","acceptance_criteria":"The shared conformance suite requires SourceID to round-trip without becoming the canonical MessageID; NellDB persists and reads source_id with empty-field compatibility for older records; SQLite remains conformant; redelivery deduplication and immutable content semantics remain unchanged.","notes":"Implemented and independently reviewed 2026-08-03. Shared conformance now pins SourceID round-trip, canonical-ID distinction, redelivery stability, empty compatibility, and non-searchability on both backends. Nell persists SourceID as numeric UTF-8 byte values so its all-string text index cannot expose correlation metadata; file-backed Nell reopen verifies JSON-decoded UTF-8 round-trip. Focused conformance/reopen tests, full gateway suite, gateway race, scoped lint, and format check pass. Fresh DeepSeek V4 Flash review found no blockers; residual note only for malformed hand-corrupted numeric arrays coercing on decode.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T12:34:38Z","created_by":"Sam Catlow","updated_at":"2026-08-03T13:16:36Z","started_at":"2026-08-03T13:03:26Z","closed_at":"2026-08-03T13:16:36Z","close_reason":"SourceID parity and metadata-safe persistence are verified on NellDB and SQLite; all focused/race/lint/format validation passes and independent review has no blockers.","dependencies":[{"issue_id":"archie-core-8u8.3","depends_on_id":"archie-core-8u8","type":"parent-child","created_at":"2026-08-03T22:34:37Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8u8.4","title":"test(gateway): pin SQLite FTS lifecycle and literal-query semantics","description":"Trigger-driven FTS synchronization and hostile-query escaping were manually verified but are not retained by the trimmed SQLite-specific test suite. Preserve these SQLite-specific guarantees without duplicating the shared SessionStore contract.","acceptance_criteria":"Table-driven tests show FTS search/count remains correct after message deletion, ReplaceMessages, and session deletion with no cross-session leak; hostile inputs including column syntax, unmatched quotes, NEAR, wildcard, and boolean operators return literal-match behavior without syntax errors; multi-term queries pin AND semantics; tests stay SQLite-specific and focused.","notes":"Implemented and independently reviewed 2026-08-03. Added SQLite-specific FTS lifecycle tests for delete/replacement/session deletion, cross-session isolation, exact counts, hostile literal queries, multi-term AND semantics, exact MATCH escaping, and FTS5 rank=1 integrity checks. Sensitivity test proves the integrity check catches orphaned index entries when the delete trigger is absent. Focused tests, full gateway suite, gateway race, scoped lint, and format check pass. Fresh DeepSeek V4 Flash review reports zero surviving findings.","status":"closed","priority":1,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T12:34:38Z","created_by":"Sam Catlow","updated_at":"2026-08-03T13:03:17Z","started_at":"2026-08-03T12:43:49Z","closed_at":"2026-08-03T13:03:17Z","close_reason":"SQLite FTS lifecycle and literal-query guarantees are regression-protected; all focused/race/lint/format validation passes and independent review is clean.","dependencies":[{"issue_id":"archie-core-8u8.4","depends_on_id":"archie-core-8u8","type":"parent-child","created_at":"2026-08-03T22:34:38Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8u8.2","title":"fix(gateway): align newest-session ordering across SessionStore backends","description":"SQLite List/GetByChannel order by created_at, while NellDB orders by latest document write/HLC. Touching or re-saving a session can therefore select a different active session after a backend cutover even though both pass the shared suite. Pin one observable newest-session contract and make both adapters satisfy it.","acceptance_criteria":"The shared conformance suite covers multiple sessions with distinct CreatedAt and LastActiveAt values plus Touch/re-save; List and GetByChannel return the same deterministic order on NellDB and SQLite; restart-style resolution selects the same session on both backends; indexes support the chosen SQLite ordering.","status":"open","priority":1,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-03T12:34:37Z","created_by":"Sam Catlow","updated_at":"2026-08-03T12:34:37Z","dependencies":[{"issue_id":"archie-core-8u8.2","depends_on_id":"archie-core-8u8","type":"parent-child","created_at":"2026-08-03T22:34:37Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8u8.2","title":"fix(gateway): align newest-session ordering across SessionStore backends","description":"SQLite List/GetByChannel order by created_at, while NellDB orders by latest document write/HLC. Touching or re-saving a session can therefore select a different active session after a backend cutover even though both pass the shared suite. Pin one observable newest-session contract and make both adapters satisfy it.","acceptance_criteria":"The shared conformance suite covers multiple sessions with distinct CreatedAt and LastActiveAt values plus Touch/re-save; List and GetByChannel return the same deterministic order on NellDB and SQLite; restart-style resolution selects the same session on both backends; indexes support the chosen SQLite ordering.","status":"in_progress","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T12:34:37Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:46:04Z","started_at":"2026-08-04T12:46:04Z","dependencies":[{"issue_id":"archie-core-8u8.2","depends_on_id":"archie-core-8u8","type":"parent-child","created_at":"2026-08-03T22:34:37Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-8u8.1","title":"test(gateway): prove SQLite session rollback and reopen durability","description":"The SQLite SessionStore uses real transactions and WAL, but current tests only verify successful operations through the same open handle. Add adversarial file-backed tests that prove persisted session/message state survives close+reopen and that injected failures during Delete and ReplaceMessages roll the transaction and FTS index back to the original state.","acceptance_criteria":"A file-backed store is closed and reopened with sessions, canonical MessageID, SourceID, text, sender, and timestamps intact; PRAGMA quick_check returns ok; deterministic abort triggers force mid-Delete and mid-ReplaceMessages failures; after each failure the original session, history, counts, and search results remain unchanged; focused and race tests pass.","notes":"Implemented and independently reviewed 2026-08-03. Added file-backed close/reopen round-trip with PRAGMA quick_check plus trigger-injected mid-Delete and mid-ReplaceMessages rollback tests that verify session/history/count/FTS state. Focused gateway tests, gateway race suite, scoped lint, and format check pass. Fresh DeepSeek V4 Flash review found zero blockers; one cosmetic early-failure handle-cleanup note only.","status":"closed","priority":1,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T12:34:36Z","created_by":"Sam Catlow","updated_at":"2026-08-03T12:43:41Z","started_at":"2026-08-03T12:35:02Z","closed_at":"2026-08-03T12:43:41Z","close_reason":"Verified durability and rollback regression coverage; focused/race/lint/format green and independent review has no surviving findings.","dependencies":[{"issue_id":"archie-core-8u8.1","depends_on_id":"archie-core-8u8","type":"parent-child","created_at":"2026-08-03T22:34:35Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-963","title":"feat(gateway): durable message deduplication via upstream IDs","description":"gateway.Message carries no upstream/channel-native message ID, so a re-delivered Telegram update appends a duplicate turn. Add Message.ID and derive the NellDB document ID from it (time-prefixed to preserve the ScanSince ID tie-break), making redelivery an idempotent LWW upsert.","notes":"ADVERSARIAL PASS 2026-08-04 (fresh reviewer). Does NOT close.\n\nClaims (b), (c), (d) HELD identically on both backends: the immutability no-op, original-timestamp retention on redelivery, and honouring an incoming MessageID. newMessageID is deterministic and session-scoped. /retry verified end to end against both real stores with a live Router -- correct text, MessageID, SourceID and re-populated addressing, and the re-save is a no-op.\n\nBLOCKED BY: archie-core-cz8 (/compress destroys the identity this bead establishes -- the guarantee survives only until the first compression), archie-core-i6q (redelivery dedups the stored turn but respond() still re-runs the model, so a duplicate assistant turn and a second billed call still happen), archie-core-la1 item 1 (/branch copies parent MessageIDs; the struct doc says MessageID is 'ignored on write' while both stores honour it).\n\nDEDUP COVERAGE: SourceID is set at exactly one site repo-wide (telegram.go:479). Email and webhook set none, so every SMTP or webhook retry appends. Email has an unused RFC 5322 Message-ID.\n\nREJECTION REVISITED: 'time-prefixed document ID' rejection upheld. The 'clamp vs Message.At' rejection is OVER-CLAIMED -- doc line 128 sits in the Conversation branches section and constrains ordering, not whether the sender's clock may be overwritten; a separate monotonic sequence field would satisfy it too. gateway.go:44-48 documents At as 'when the message happened' while the store persists a mutated value, and no test pins what a caller reads back after a clamp. Sam's call, not the reviewer's.\n\nOUT OF SCOPE, unimplemented: doc lines 112-114 require edits/deletions/branches be represented 'through related records or events'. Only the immutability half exists; an edit is dropped on the floor. Not live loss today (telegram.go:233 AllowedUpdates excludes edited_message), but this bead should not read as 'immutability done'.","status":"open","priority":1,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-03T09:25:26Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:02:26Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-gih","title":"fix(gateway): synchronize sessionTracker.active","description":"sessionTracker.active is a plain map with no mutex. go-telegram/bot dispatches each update in its own goroutine, so resolve() writes it while getActive() reads it concurrently. Backend-agnostic Go data race.","notes":"ADVERSARIAL PASS 2026-08-04 (fresh reviewer). The synchronization is CORRECT; the bead does not close on adjacent logic bugs.\n\nVERIFIED LOAD-BEARING: all four accesses to sessionTracker.active are guarded, no unguarded read or write anywhere in the package, no lock nesting or self-deadlock, no lock held across I/O or a channel send, every Unlock deferred. Stripping the RWMutex from all four sites produced 12 DATA RACE reports AND an assertion failure in TestSessionTrackerResolveIsStable, proving the double-check does real work rather than silencing the detector. Restored: -count=50 -race clean. PersonaRegistry.active is separately and correctly guarded.\n\nBLOCKED BY: archie-core-jex (/topic off poisons the cache with an empty session ID, sticky, reachable from webhook and email), archie-core-x35 (the double-check makes callers agree but the loser has already persisted its session, orphaning it), archie-core-7s3 (resolve picks an arbitrary session, not the most recent).","status":"open","priority":1,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-03T09:25:25Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:02:26Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -201,7 +201,7 @@
|
||||
{"_type":"issue","id":"archie-core-3cf.8","title":"Make activity and task context navigable","description":"The dashboard's live activity entries are not clickable, task detail does not provide a source-task/forge link, and the Tasks KPI strip sits directly against the table. Make activity events navigate to the relevant dashboard area, expose a clear source task action that opens the task's forge page when available, and restore visual separation between KPI cards and the task table. Add focused UI/runtime tests.","status":"closed","priority":2,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:25:09Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:27:58Z","started_at":"2026-08-03T16:25:10Z","closed_at":"2026-08-03T16:27:58Z","close_reason":"Implemented activity-to-task navigation, task source links using configured forge host, and Tasks KPI/table spacing. UI tests, build, and diff checks pass.","dependencies":[{"issue_id":"archie-core-3cf.8","depends_on_id":"archie-core-3cf","type":"parent-child","created_at":"2026-08-04T02:25:09Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-3cf.7","title":"Discover user-installed global skills alongside project skills","description":"The Web UI currently scans only the daemon work directory, so skills installed under the user's global ~/.agents/skills are invisible. Add global-skill discovery alongside project skills, preserve deterministic precedence for duplicate names, expose source/path in the API/UI, and keep workflow activation using the same merged catalogue. Add tests for configured and default roots.","status":"closed","priority":2,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:13:45Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:17:41Z","started_at":"2026-08-03T16:14:04Z","closed_at":"2026-08-03T16:17:41Z","close_reason":"Implemented layered project/shared/user-global skill discovery, deterministic precedence, global activation support, UI messaging, and tests.","dependencies":[{"issue_id":"archie-core-3cf.7","depends_on_id":"archie-core-3cf","type":"parent-child","created_at":"2026-08-04T02:13:45Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-7ve","title":"test(gateway): the conformance suite does not pin what it claims, and the backends already drift","description":"The commit message for 3eb00db claims the shared suite means NellDB and SQLite 'cannot drift'. Two confirmed divergences it does not catch:\n\n1. testReplaceMessagesIsFailureSafe (sessionstore_conformance_test.go:769) never induces a failure -- four happy-path cases asserting the post-condition of a SUCCESSFUL call. Swapping the write and delete loops in session_store.go:696-708 would leave it green. Only SQLite has a real abort test, and it pins rollback, the opposite failure mode. The backends genuinely differ here: SQLite is atomic (failure -\u003e clean rollback), NellDB is not (failure -\u003e duplicates). SQLite's semantics are better; the point is the suite does not know.\n\n2. NellDB's lastTS cache is never invalidated by deletes; SQLite recomputes MAX(ts). Save at 13:00, delete it, save with At=12:00 -\u003e NellDB persists 13:00:00.001Z, SQLite persists 12:00:00Z. Both pass the suite.\n\n3. GetByChannel ordering differs between backends and is unpinned (see the newest-first bead).\n\n4. applyCompress has zero test coverage: no test in the package calls it, none of its three error returns is exercised, and fakeSessionStore.ReplaceMessages is a slice assignment that cannot observe ordering or identity.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:53Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:01:53Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-la1","title":"fix(gateway): doc comments contradict the implementation in three places","description":"Each of these actively misleads, and one already caused a real bug:\n\n1. gateway.go:23-27 says MessageID is 'Populated on read; ignored on write.' Both stores honour an incoming MessageID in preference to deriving one (session_store.go:588, session_store_sqlite.go:291). This is exactly the misreading behind /branch copying parent history into the child under the PARENT's canonical IDs -- CONFIRMED on both backends, and newMessageID's own doc claims the opposite ('the same upstream message copied into a branch gets its own identity'). Two branches from one parent produce three sessions holding the same MessageID.\n\n2. session_store.go:405-409 describes msgID and a disambiguating counter, both deleted in this commit, and now sits above messageIDNamespace describing the opposite of the current design.\n\n3. telegram.go:474-477 still says a redelivered update 'updates the stored turn' -- the exact behaviour the immutability fix removed.","status":"in_progress","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:53Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:23:28Z","started_at":"2026-08-04T12:23:28Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-la1","title":"fix(gateway): doc comments contradict the implementation in three places","description":"Each of these actively misleads, and one already caused a real bug:\n\n1. gateway.go:23-27 says MessageID is 'Populated on read; ignored on write.' Both stores honour an incoming MessageID in preference to deriving one (session_store.go:588, session_store_sqlite.go:291). This is exactly the misreading behind /branch copying parent history into the child under the PARENT's canonical IDs -- CONFIRMED on both backends, and newMessageID's own doc claims the opposite ('the same upstream message copied into a branch gets its own identity'). Two branches from one parent produce three sessions holding the same MessageID.\n\n2. session_store.go:405-409 describes msgID and a disambiguating counter, both deleted in this commit, and now sits above messageIDNamespace describing the opposite of the current design.\n\n3. telegram.go:474-477 still says a redelivered update 'updates the stored turn' -- the exact behaviour the immutability fix removed.","status":"closed","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:53Z","created_by":"Sam Catlow","updated_at":"2026-08-04T12:25:28Z","started_at":"2026-08-04T12:23:28Z","closed_at":"2026-08-04T12:25:28Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-le6","title":"fix(gateway): assorted confirmed defects around the compress and undo paths","description":"Small, individually confirmed, none blocking on their own:\n\n1. session_commands.go:563 -- the compression summary is persisted as a USER turn. CompressHistory emits it with Role 'system' (compression.go:118) but the write-back only maps 'assistant' -\u003e Identity, so system falls through to 'user'. The model replays '[Earlier conversation has been summarised...]' as if the human said it. (Retained bot turns are handled correctly.)\n\n2. session_commands.go:488 -- compressPreview reads RecentMessages(200) while reporting count from MessageCount. With 100 large + 250 tiny messages the preview says 'Compression not needed (350 messages, ~0 tokens)' while apply on the same session reports '350 -\u003e 24 (~100000 -\u003e ~3063 tokens)'. The two numbers in one sentence describe different histories, and the preview advises against a compression that is needed.\n\n3. session_commands.go:329 -- handleUndo discards the deleted count from DeleteRecentMessages, so /undo 10 failing after 6 removals reports failure while six messages are gone.\n\n4. session_store.go:626 -- nextTimestamp has no upper bound and lastTimestamp re-reads from the store, so one future-dated write (host clock 24h fast) pins the session's clock for its lifetime; every later At handed to callers is wrong by a day.\n\n5. session_store.go:268 -- Close() calls s.store.Close() on the SHARED nl.Store (in production the daemon's tasks/events log) and, unlike every other method, does not take s.mu. Nothing calls it today.\n\n6. session_store.go:429 -- newMessageID's UUIDv5 input sessionID+\"\\x00\"+sourceID is not injectively encoded: newMessageID('a\\x00b','c') == newMessageID('a','b\\x00c'). No reachable input today; hardening, not a live bug.\n\n7. turns.go:79-85 -- Turns.lanes grows without bound; a lane is inserted per session key and never deleted. No goroutine leak.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-08-03T16:01:53Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:01:53Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-3cf.5","title":"Add accessible interaction semantics across the dashboard","description":"Source review found navigation icons and a theme toggle that depend on visual glyphs or title text, and task rows are clickable table rows without keyboard semantics or an explicit expandable control. Audit the main pages for labels, focus visibility, keyboard operation, semantic headings and table behavior, status announcements, and sufficient non-color cues. Add automated DOM/accessibility-oriented regression tests for the critical controls.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-03T15:17:59Z","created_by":"Sam Catlow","updated_at":"2026-08-03T15:17:59Z","dependencies":[{"issue_id":"archie-core-3cf.5","depends_on_id":"archie-core-3cf","type":"parent-child","created_at":"2026-08-04T01:17:59Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-3cf.3","title":"Make dense dashboard views usable on narrow screens","description":"The responsive layout collapses the sidebar at 860px, but the dashboard relies on dense tables and multi-control filter rows without a documented table overflow/stacking treatment. Exercise dashboard, tasks, logs, workflows, settings, and channels at narrow viewport widths; fix clipping, horizontal scrolling ownership, control wrapping, and touch target sizing while preserving desktop density.","status":"closed","priority":2,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-03T15:17:40Z","created_by":"Sam Catlow","updated_at":"2026-08-03T16:08:59Z","started_at":"2026-08-03T15:55:36Z","closed_at":"2026-08-03T16:08:59Z","close_reason":"Completed responsive table containment across dashboard, tasks, settings, and workflows; added narrow-screen filter wrapping and grid shrink safeguards. Validated with ui npm test and npm run build; live daemon verification requires restarting the embedded UI bundle.","dependencies":[{"issue_id":"archie-core-3cf.3","depends_on_id":"archie-core-3cf","type":"parent-child","created_at":"2026-08-04T01:17:39Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
|
||||
Reference in new issue
Block a user