fix: silence a staticcheck directive false alarm and file remaining lint debt
configtemplate's package comment explained the module-root placement by
naming the embed directive in prose, which staticcheck reads as a
malformed directive (SA9009). Reworded, with a note saying why.
Found by running golangci-lint repo-wide while auditing 6108fc5, which
also showed that archie-core-qa4 reports 4/4 phases complete and offers
to close while 56 findings remain. Filed as archie-core-qa4.5 so the
epic's completion count reflects the gate rather than the phase list;
qa4.5 depends on archie-core-ts9, because the nilerr findings in grep.go
are the same swallowed-error bug and fixing them mechanically would
change tool behaviour.
This commit is contained in:
1 parent
14be7c5567
commit
8a8caa1ca7
2 files changed
+9
-7
No files matched your search
+4
-3
@@ -53,7 +53,8 @@
|
||||
{"_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-0d6","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.","acceptance_criteria":"parseModelRest 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.","notes":"Fixed by making splitProviderFlag the sole accumulator of surviving fields and returning them, so the shared-slice shape that allowed the double append is structurally impossible. Tests: TestParseModelRestDoesNotDoubleTheModelName, TestParseModelRestReturnsDeclaredValuesInOrder.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-29T16:18:46Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:19:23Z","closed_at":"2026-07-29T16:19:23Z","dependencies":[{"issue_id":"archie-core-0d6","depends_on_id":"archie-core-ifi","type":"discovered-from","created_at":"2026-07-30T02:18:46Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-qa4.5","title":"Phase 5: the 56 lint findings Phase 4 left behind","description":"Discovered as a side effect of the 6d4e0be audit (archie-core-ifi), not as its\ngoal: running golangci-lint over the two packages I had touched showed findings\nin files nobody had flagged, so I ran it repo-wide.\n\nAll four children of archie-core-qa4 are closed and the epic reports \"4/4\ncomplete (100%) -- eligible for close\", but `golangci-lint run ./...` still\nreports 56 issues. The epic must not be closed on that prompt; its own\ndescription says the gate is RED until it closes, so closing it early declares\na green gate that does not exist.\n\nBreakdown: noctx 11, gocognit 11, gocritic 6, errcheck 6, nilerr 4, recvcheck 3,\nnestif 3, godox 3, sloglint 2, predeclared 2, funlen 2, gofumpt 1, cyclop 1,\nstaticcheck 0 (the one hit, configtemplate.go:6, is fixed).\n\nThe gocognit remainder is concentrated in exactly the functions Phase 4 named as\ndeferred -- cmd/archied/main.go run (106, the description predicted \"108-\u003e30\nremaining\" and it did not land), internal/workflow AgentStage.Stage (68),\nFeasibility and TDD (funlen), cmd/archie-agent startMCPProviders (45) -- plus\nthe whole of internal/tools/builtin: grepFallback 58, runFindGoFallback 57,\nmakeReadExecutor 56, makeGrepExecutor 41, makeShellExecutor 40, makeWriteExecutor\n38, suggestPaths 36. tomlwrite.Apply (82) is new, uncommitted-until-7fab597 code.\n\nREAD archie-core-qa4's notes before starting. Both known behaviour regressions\nfrom this epic came out of structural extraction, and every remaining gocognit\nsite is a structural extraction waiting to happen. The nilerr findings in\ngrep.go are not noise either -- see archie-core-ts9, where the same swallow in\nfind.go is a live false-negative bug. Fixing nilerr by \"returning the error\"\nwithout deciding what the caller does with it will change tool behaviour.","acceptance_criteria":"golangci-lint run ./... reports 0 issues, or every remaining finding has an explicit nolint with a reason. Each structural extraction lands with a behavioural test for the function it splits, per the discipline recorded in archie-core-qa4's notes.","status":"open","priority":1,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-29T16:26:57Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:26:57Z","dependencies":[{"issue_id":"archie-core-qa4.5","depends_on_id":"archie-core-qa4","type":"parent-child","created_at":"2026-07-30T02:26:57Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-qa4.5","depends_on_id":"archie-core-ts9","type":"blocks","created_at":"2026-07-30T02:27:02Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-qa4.5","depends_on_id":"archie-core-ifi","type":"discovered-from","created_at":"2026-07-30T02:26:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-0d6","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.","design":"Two 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.","acceptance_criteria":"parseModelRest 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.","notes":"Fixed by making splitProviderFlag the sole accumulator of surviving fields and returning them, so the shared-slice shape that allowed the double append is structurally impossible. Tests: TestParseModelRestDoesNotDoubleTheModelName, TestParseModelRestReturnsDeclaredValuesInOrder.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-29T16:18:46Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:26:09Z","closed_at":"2026-07-29T16:19:23Z","dependencies":[{"issue_id":"archie-core-0d6","depends_on_id":"archie-core-ifi","type":"discovered-from","created_at":"2026-07-30T02:18:46Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-ewk.1","title":"Export configuration.Validate for archied setup to call","description":"The ewk epic's acceptance criteria (and archie-core-cbk's, by inheritance) require: \"Every config it writes passes configuration.Validate, verified by a test that runs setup non-interactively and validates the output.\" That identifier does not exist. internal/infrastructure/configuration/validate.go defines only an unexported validate(cfg *config.Config) error, called from one place: loader.go:178 inside Loader.Load's own decode-then-validate sequence. There is no way for code outside the configuration package -- e.g. `archied setup` after it builds a config.Config in memory but before writing it to disk -- to run the same validation.\n\nDiscovered while implementing archie-core-rs9 (TOML write strategy). Not fixed there: rs9's scope was the text-patching mechanism, not wiring setup's actual validation step, and exporting validate() is really part of cbk's job (the thing that needs to call it).","acceptance_criteria":"configuration package exposes a callable that runs the same checks as the current unexported validate() against a config.Config value in memory (either export validate itself, or add a thin Validate(cfg *config.Config) error wrapper -- whichever fits the package's existing exported-surface conventions). Loader.Load continues to use it internally with no behavior change. A test outside the package (e.g. in cbk's setup tests) can call it directly without going through file I/O.","status":"open","priority":1,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-29T16:18:36Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:18:36Z","dependencies":[{"issue_id":"archie-core-ewk.1","depends_on_id":"archie-core-ewk","type":"parent-child","created_at":"2026-07-30T02:18:36Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-1y6","title":"SOUL cannot override the prompt invariants","description":"Enforce the boundary that makes SOUL safe to hand to users: it supplies identity and style, and cannot reach the instruction hierarchy, core rules, tool inventory or env block.","acceptance_criteria":"A test renders a hostile SOUL that attempts to countermand core_rules and asserts the invariant sections are still present and intact. The boundary is documented where the layering rule already lives so the next person editing the template does not quietly relax it.","status":"open","priority":1,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-29T16:09:56Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:09:56Z","dependencies":[{"issue_id":"archie-core-1y6","depends_on_id":"archie-core-4gv","type":"parent-child","created_at":"2026-07-30T02:09:56Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-z8c","title":"SOUL loader with per-turn reload and default fallback","description":"Load the SOUL file from the config dir into the identity slot of the rendered prompt, re-reading it per turn so an edit takes effect on the next message with no restart.","acceptance_criteria":"SOUL content is rendered into the identity slot ahead of the invariant sections. An absent, empty or unreadable SOUL falls back to the shipped default identity rather than rendering nothing. Editing the file changes the next turn's prompt with no restart. A read error is logged once and degrades to the default; it never fails the turn. Size is bounded so an oversized SOUL cannot crowd out the rules.","status":"open","priority":1,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-07-29T16:09:56Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:09:56Z","dependencies":[{"issue_id":"archie-core-z8c","depends_on_id":"archie-core-4gv","type":"parent-child","created_at":"2026-07-30T02:09:55Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -82,7 +83,7 @@
|
||||
{"_type":"issue","id":"archie-core-qa4.3","title":"Phase 3: correctness findings needing judgement (~62 issues)","description":"nilerr (11: 6 in internal/agentexec inprocess.go/worker.go, 2 gateway), bodyclose (1), contextcheck (7), containedctx (2), fatcontext. SINGLE SESSION, sequential, no subagents: each nilerr site needs a read of whether the swallow is deliberate degradation or a real bug, and a context-free worker will silently convert deliberate behaviour into a change. Do nilerr FIRST -- highest bug probability in the whole set. BLOCKED on a policy decision for noctx (41 sites, mostly webui/worktree/store): fixing it means threading context through public APIs, which is an API change, not a lint fix.","status":"closed","priority":1,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-27T15:23:00Z","created_by":"Sam Catlow","updated_at":"2026-07-29T00:10:46Z","started_at":"2026-07-28T17:27:59Z","closed_at":"2026-07-29T00:10:46Z","close_reason":"Closed","dependencies":[{"issue_id":"archie-core-qa4.3","depends_on_id":"archie-core-qa4","type":"parent-child","created_at":"2026-07-28T01:23:00Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-qa4.1","title":"Phase 1: autofix pass (~35 issues)","description":"golangci-lint run --fix plus the formatters. Covers errorlint, fatcontext, gocritic, sloglint, usestdlibvars, usetesting, gci, gofumpt, goimports. Zero judgement. MUST run first: it touches formatting across every file and would conflict with anything in flight. Single command, single commit, verify with task check.","status":"closed","priority":1,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-27T15:22:59Z","created_by":"Sam Catlow","updated_at":"2026-07-28T17:23:59Z","started_at":"2026-07-28T17:18:45Z","closed_at":"2026-07-28T17:23:59Z","close_reason":"Closed","dependencies":[{"issue_id":"archie-core-qa4.1","depends_on_id":"archie-core-qa4","type":"parent-child","created_at":"2026-07-28T01:22:58Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-qa4.2","title":"Phase 2: mechanical per-package fixes (~40 issues)","description":"forcetypeassert (24, internal/tools 20 + internal/memory 2, nearly all tests), predeclared (9, webui/ratelimit/memory), leftover unconvert. Purely mechanical, package-local, no design judgement. THE ONLY PHASE WORTH PARALLELISING. Partition by package: tools / webui / memory+ratelimit / secret. Use git worktree isolation -- other sessions edit this repo concurrently and stale diagnostics are a known hazard. Each worker verifies scoped: go test ./internal/X/... plus golangci-lint run ./internal/X/...","status":"closed","priority":1,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-27T15:22:59Z","created_by":"Sam Catlow","updated_at":"2026-07-28T17:23:35Z","started_at":"2026-07-28T17:18:49Z","closed_at":"2026-07-28T17:23:35Z","close_reason":"Closed","dependencies":[{"issue_id":"archie-core-qa4.2","depends_on_id":"archie-core-qa4","type":"parent-child","created_at":"2026-07-28T01:22:59Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-qa4","title":"[EPIC] Clear the 160 golangci-lint findings","description":"Config landed in 9298afd; the gate is RED until this epic closes. Four phases, ordered by risk and by what invalidates what. Structural refactor MUST be last: it moves line numbers and invalidates everything in flight.","notes":"Two behaviour regressions have now come out of lint-clearing work: the errorlint --fix in 6d4e0be (grep exit codes, fixed 782510d) and the nestif extraction in 651de0a (doubled model name, archie-core-0d6). Neither was caught by inspection. Treat structural extractions done for gocognit/nestif/cyclop as behaviour-bearing: when a helper is handed a collection by pointer or an index loop becomes a range loop, check the accumulation and the skip semantics before trusting the diff. Note makeShellExecutor is still flagged gocognit 40 -- that is the same pressure that produced 651de0a.","status":"open","priority":1,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-07-27T15:22:58Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:19:23Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-qa4","title":"[EPIC] Clear the 160 golangci-lint findings","description":"Config landed in 9298afd; the gate is RED until this epic closes. Four phases, ordered by risk and by what invalidates what. Structural refactor MUST be last: it moves line numbers and invalidates everything in flight.","notes":"DO NOT CLOSE ON THE 100% PROMPT. All four original phases are closed and the\nepic advertised itself as \"eligible for close\", but golangci-lint run ./...\nstill reports 56 issues -- found incidentally while auditing 6d4e0be\n(archie-core-ifi). Filed as archie-core-qa4.5, now a fifth child, so the\ncompletion count reflects reality. The epic's own description says the gate is\nRED until it closes, so closing it early would have declared a green gate that\ndoes not exist. Phase 4's description already hedged that archied main.go run\nwould land at \"108-\u003e30 remaining\"; it is still at 106.","status":"open","priority":1,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-07-27T15:22:58Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:27:14Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-4we","title":"Port tau internal/indexing (codesearch) into archie-core","description":"First slice of the tau cherry-pick strategy. Copy-and-mutate (NOT extract to pkg/ - Sam's decision: exporting would force designing metrics/session/logger seams upfront before archie-core knows which it wants differently).\n\ntau/internal/indexing is the cheapest high-value lift: 512 LoC, one file, and its only tau coupling is 3 calls to config.WorkspaceIndexDir()/WorkspaceIndexDBPath(). Nothing else in tau imports it.\n\nMutations: replace the global config path helpers with explicit constructor params (archie-core passes config, no globals); add the workspace-codesearch helper subcommand to archied since the manager deliberately runs google/codesearch in a child process (upstream fatal exits + mmap leaks must not kill the daemon).\n\nEach lifted file carries a provenance header (source path + tau commit) so a future refresh is a diff, not archaeology.","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-27T13:41:58Z","created_by":"Sam Catlow","updated_at":"2026-07-27T13:47:42Z","started_at":"2026-07-27T13:42:57Z","closed_at":"2026-07-27T13:47:42Z","close_reason":"Ported tau internal/indexing/codesearch.go @ 4893818d0c76 into archie-core internal/indexing. Mutations: global config path helpers replaced by explicit indexing.Config + DefaultConfig(workDir) (two archied instances share carina and must not share an index); child-process helper is archied's own 'workspace-codesearch' subcommand in cmd/archied/codesearch.go, dispatched from main() before flag parsing so it touches no config/store/NATS; deferred db.Close explicitly discarded for errcheck. Added dep github.com/google/codesearch v1.3.0-rc.1 (uuid and modernc sqlite already present). Verified E2E against the real repo: 2.2MB indexed in 0.05s, correct hits, [] for no match, corrupt index -\u003e clean error exit 1 rather than process death. task check clean; golangci-lint 0 issues on both packages. Commit c924281. NOT pushed. Follow-up: nothing calls indexing.NewManager yet -- it is ported and proven but not wired into the agent's grep path.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-sc5","title":"Chat: real system prompt template for Archie (identity, tools, env)","description":"The chat agent's system prompt is the four-sentence static string in gateway.DefaultPersonas(). It carries no tool inventory, no environment/date block, and no instruction precedence, so the model invents its own capabilities -- it told Sam it 'only has the memory editing tool' and then offered to walk him through installing software it cannot install.\n\nTake the shape from tau: /work/apps/tau/internal/agent/templates/agent.md.tpl renders an agent body plus \u003ctools\u003e, \u003cguidelines\u003e, \u003cproject_context\u003e and \u003cenv\u003e blocks, and /work/apps/tau/internal/agent/spec/templates/tau.agent.md supplies identity, instruction precedence, core rules, communication rules and confirmation boundaries.\n\nKeep the existing PersonaRegistry as the style layer; the template is the substrate it renders into.","status":"closed","priority":1,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-07-27T12:14:08Z","created_by":"Sam Catlow","updated_at":"2026-07-27T12:20:52Z","closed_at":"2026-07-27T12:20:52Z","close_reason":"Implemented gateway.BuildSystemPrompt rendering internal/gateway/templates/archie.md.tpl: instruction precedence, core rules, communication rules, \u003ctools\u003e and \u003cenv\u003e blocks, with PersonaRegistry kept as the style layer on top. Tool inventory is derived from the same core.ToolSet passed to the model (cmd/archied/toolSummaries) so prompt and reality cannot drift; empty toolset renders an explicit 'no tools are available'. Tool metadata is markup-escaped and whitespace-flattened against forged tags and forged list entries. task check clean: vet, full go test ./... , golangci-lint 0 issues on changed packages, gofumpt clean. Commit 7fde716. NOT yet deployed - not pushed.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-qnm","title":"Telegram: remove task approval from the public command surface","description":"Existing /approve [identity=name] \u003ctask-id\u003e was inherited as chat-task lifecycle control, but Sam explicitly states task approvals are not a product requirement. Reserve /approve exclusively for dangerous-command approval. Remove task approval from Telegram command menu/help/router/public UX; retain or remove internal waiting_human task mechanics only after verifying workflow callers. Do not repurpose the command until the dangerous-command approval model (archie-core-alm.6) exists.","acceptance_criteria":"Telegram no longer advertises or accepts task approval via /approve; no documentation/help describes task approvals; task lifecycle code is not broken for existing non-Telegram workflow paths; /approve remains unclaimed or is implemented only for the approved dangerous-command design.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-27T09:00:56Z","created_by":"Sam Catlow","updated_at":"2026-07-28T17:24:07Z","started_at":"2026-07-28T17:18:47Z","closed_at":"2026-07-28T17:24:07Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
@@ -168,7 +169,7 @@
|
||||
{"_type":"issue","id":"archie-core-s1r","title":"Test forge fakes missing LinkBranch method broke go vet/test for whole module","description":"forge.Forge gained LinkBranch(ctx, owner, repo, issueNumber, branch) error in the branch-linking feature (ff4c51e) but the hand-rolled test doubles (stubForge in cmd/archied/main_test.go, prCapturingForge in cmd/archie-agent/taskrun_test.go, testForge in internal/daemon/daemon_test.go, fakeForge in internal/forgerpc/forgerpc_test.go) never got the method added, so they stopped satisfying forge.Forge. This broke go vet ./... and go test ./... for the entire module, not just those 4 packages, since go vet type-checks all test files as part of module vet. Fixed by adding LinkBranch stubs to all four fakes.","status":"closed","priority":1,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-07-24T03:04:53Z","created_by":"Sam Catlow","updated_at":"2026-07-24T03:04:58Z","closed_at":"2026-07-24T03:04:58Z","close_reason":"Added LinkBranch stub methods to stubForge, prCapturingForge, testForge, and fakeForge. go build/vet/test ./... now clean across the whole module.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-633","title":"config.docker.toml missing required fields, no overlay merge implemented","description":"config.docker.toml was rewritten to be a docs-as-overlay file (comment says base+overlay merge) but internal/config.Load has no merge logic and docker-compose.yml mounts only config.docker.toml at /etc/archie/config.toml. It is missing bot_user, [forge], [dispatch], [models], [providers], [budgets] which Load requires -\u003e daemon fails to start in docker as currently configured. Implement real base+overlay config loading (or restore a full standalone docker config) so there is one source of truth.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-24T02:42:07Z","created_by":"Sam Catlow","updated_at":"2026-07-24T02:44:53Z","started_at":"2026-07-24T02:42:11Z","closed_at":"2026-07-24T02:44:53Z","close_reason":"Implemented config.LoadOverlay (base decode + overlay decode into same struct, then shared finalize/validate), wired -config-overlay flag in cmd/archied, fixed docker-compose.yml to mount both base config.toml and config.docker.toml overlay, minimized config.docker.toml to true diff-only overlay, added tests proving overlay-omitted required fields (bot_user, repos) still come from base.","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-u64","title":"Daemon: process multiple tasks concurrently (max_concurrency enforcement)","description":"Daemon currently processes one task at a time (docs/prds/archie-core-v2-architecture.md Phase 2). This is the core blocker between current state and any multi-agent scaling mode — needed before container max_concurrency or same-repo concurrency can matter. Wire the daemon's dispatch loop to run N tasks in parallel, respecting a configurable max_concurrency.","design":"internal/container/pool.go already enforces max_concurrency for container lifecycle — reuse that limit/pattern in the daemon's task dispatch rather than inventing a second concurrency control.","acceptance_criteria":"Daemon dispatch loop runs multiple tasks concurrently up to a configured max_concurrency limit; single-task-at-a-time behavior is gone.","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-23T19:36:31Z","created_by":"Sam Catlow","updated_at":"2026-07-23T21:37:42Z","started_at":"2026-07-23T21:29:41Z","closed_at":"2026-07-23T21:37:42Z","close_reason":"Implemented concurrent SQLite and NATS task dispatch using containers.max_concurrency, with default same-repo serialization and race-tested dispatcher coverage.","dependency_count":0,"dependent_count":2,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-ts9","title":"[BUG] find fallback reports a cancelled walk as 'no matches found'","description":"runFindGoFallback's walk callback swallows every per-entry error (returns nil to skip inaccessible entries), so the only error that can escape filepath.WalkDir is ctx.Err() from the cancellation select. The guard 'if err != nil \u0026\u0026 !errors.Is(err, ctx.Err())' therefore never fires: on timeout or /stop the function falls through and returns whatever it had collected, or 'no matches found' when it had collected nothing. This is the same failure the grep exit-code bug had -- the model is told a search found nothing when the search did not finish. Behaviour predates 6d4e0be; the errors.Is autofix in that commit is behaviour-neutral here (errors.Is(err, nil) is false for non-nil err, matching the old err != ctx.Err() when the context is live).","acceptance_criteria":"A find whose context is cancelled mid-walk returns an error result naming the cancellation, not 'no matches found' and not a silently partial list. Regression test in the style of TestGrepReportsSearchFailureRatherThanNoMatches.","status":"open","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-29T16:19:00Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:19:00Z","dependencies":[{"issue_id":"archie-core-ts9","depends_on_id":"archie-core-ifi","type":"discovered-from","created_at":"2026-07-30T02:18:59Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-ts9","title":"[BUG] find fallback reports a cancelled walk as 'no matches found'","description":"runFindGoFallback's walk callback swallows every per-entry error (returns nil to skip inaccessible entries), so the only error that can escape filepath.WalkDir is ctx.Err() from the cancellation select. The guard 'if err != nil \u0026\u0026 !errors.Is(err, ctx.Err())' therefore never fires: on timeout or /stop the function falls through and returns whatever it had collected, or 'no matches found' when it had collected nothing. This is the same failure the grep exit-code bug had -- the model is told a search found nothing when the search did not finish. Behaviour predates 6d4e0be; the errors.Is autofix in that commit is behaviour-neutral here (errors.Is(err, nil) is false for non-nil err, matching the old err != ctx.Err() when the context is live).","acceptance_criteria":"A find whose context is cancelled mid-walk returns an error result naming the cancellation, not 'no matches found' and not a silently partial list. Regression test in the style of TestGrepReportsSearchFailureRatherThanNoMatches.","notes":"Evidence, gathered while auditing 6d4e0be for archie-core-ifi. The swallow is\nat internal/tools/builtin/find.go:169-171 -- the WalkDir callback returns nil\nfor every per-entry error (\"skip inaccessible entries\"). The only error that\ncan reach the guard at find.go:242 is ctx.Err(), returned by the cancellation\nselect at find.go:173-177, and the guard exists specifically to ignore that.\nSo the guard can never fire, and a cancelled walk falls through to the\nlen(matches)==0 check at find.go:245 and returns Content:\"no matches found\",\nIsError:false -- the same false-negative shape as the grep exit-code bug.\n\nThe linter is already pointing at this. golangci-lint reports nilerr on the\nidentical swallow in internal/tools/builtin/grep.go:380 and :411, so grep's\ndirect-search path likely has the same hole; that was not in scope for the\naudit and is not verified. Whoever fixes this should check both files, and\nshould decide the harder question the bug hides: partial results from a\ncancelled walk are currently returned as if complete, so \"report the\ncancellation\" has to choose between discarding them and labelling them.\n\nLeft as-is deliberately. The audit's scope was behaviour CHANGES in 6d4e0be\nand this predates it -- the errors.Is rewrite in that commit is neutral here.","status":"open","priority":2,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-07-29T16:19:00Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:26:25Z","dependencies":[{"issue_id":"archie-core-ts9","depends_on_id":"archie-core-ifi","type":"discovered-from","created_at":"2026-07-30T02:18:59Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-60f","title":"Seed a default SOUL without clobbering user edits","description":"Write a starter SOUL on first run and allow upgrading untouched scaffolding in place, following Hermes' is_legacy_template_soul approach: compare normalised content against known-shipped templates, which carry zero user intent, and only replace on an exact match.","acceptance_criteria":"First run seeds a documented starter SOUL. A SOUL matching a known shipped template can be upgraded in place. A SOUL the user has edited in any way is never modified. Comparison normalises line endings and trailing whitespace so a CRLF checkout does not defeat it.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-07-29T16:09:58Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:09:58Z","dependencies":[{"issue_id":"archie-core-60f","depends_on_id":"archie-core-4gv","type":"parent-child","created_at":"2026-07-30T02:09:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-t08","title":"Reconcile SOUL with PersonaRegistry and the six built-in personas","description":"Decide what happens to DefaultPersonas() (archie, helpful, concise, technical, creative, teacher) and the /personality command once SOUL owns identity. Options: SOUL replaces the default archie persona and the rest remain selectable style modifiers; or personas become seed templates a user copies into their SOUL; or personas are retired. Currently GetActive composes the baseline archie prompt with the selected persona, so the interaction with SOUL must be explicit rather than emergent.","acceptance_criteria":"Precedence between SOUL and a selected persona is defined and documented. /personality either keeps working with stated semantics or is removed deliberately. No path lets a persona selection blank out the user's SOUL without them asking.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-07-29T16:09:57Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:09:57Z","dependencies":[{"issue_id":"archie-core-t08","depends_on_id":"archie-core-4gv","type":"parent-child","created_at":"2026-07-30T02:09:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
{"_type":"issue","id":"archie-core-3fb","title":"worktree.Manager gets an empty token when the forge degrades","description":"Since 518a1a0 a missing forge credential disables the forge instead of stopping archied. resolveForge returns an empty token in that case and cmd/archied/main.go still hands it to worktree.Manager{Token: token}. If repos are configured while the forge is disabled, clone/push fails at push time rather than at startup. This is the intended trade -- a deferred error beats a crash loop -- but the failure is currently discovered late and its message will not explain that the cause is an unconfigured forge.","acceptance_criteria":"A worktree operation attempted with no forge credential fails with a message naming the missing forge configuration as the cause, rather than a bare git transport error. Alternatively the manager refuses the operation up front. Either way the operator can tell why from the error alone.","status":"open","priority":2,"issue_type":"bug","owner":"sam@catlow.tech","created_at":"2026-07-29T16:09:21Z","created_by":"Sam Catlow","updated_at":"2026-07-29T16:09:21Z","dependency_count":0,"dependent_count":0,"comment_count":0}
|
||||
|
||||
+5
-4
@@ -2,10 +2,11 @@
|
||||
// generate a first-run config.toml from the exact file operators already
|
||||
// read as documentation, instead of a second copy that can drift from it.
|
||||
//
|
||||
// It lives at the module root, rather than under internal/, because
|
||||
// go:embed patterns cannot reach outside the directory of the .go file
|
||||
// that declares them, and config.example.toml is kept at the root where
|
||||
// it is easy to find and hand-edit.
|
||||
// It lives at the module root, rather than under internal/, because embed
|
||||
// patterns cannot reach outside the directory of the .go file that declares
|
||||
// them, and config.example.toml is kept at the root where it is easy to
|
||||
// find and hand-edit. (Written without the directive prefix on purpose:
|
||||
// staticcheck reads "// go:embed" in prose as a malformed directive.)
|
||||
package configtemplate
|
||||
|
||||
import _ "embed"
|
||||
|
||||
Reference in new issue
Block a user