chore: beads interactions

This commit is contained in:
sam committed 2026-08-31 22:52:35 +10:00
1 parent c3e9e4c43e
commit 27e6bbccf9
2 files changed
+17 -2

No files matched your search

+14
View File
@@ -140,3 +140,17 @@
{"id":"int-d61ab877d6ab666df299085a52ca1c75","kind":"field_change","created_at":"2026-08-25T16:02:24.011512716Z","actor":"Sam Catlow","issue_id":"archie-core-vq92","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"task_logs cursor pagination, level/time filters, and honest truncation reporting"}}
{"id":"int-6578329d076c7da3806f4c446f2dfe20","kind":"field_change","created_at":"2026-08-27T14:31:41.48495579Z","actor":"Sam Catlow","issue_id":"archie-core-1786637489932-6-1f803e02","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Wired GET /api/curators (names, health, last-run, recent actions) backed by a new bounded in-memory activity tracker in internal/domain/curator, plus a Curators dashboard page at ui/src/curators/."}}
{"id":"int-ca5043a35866779a1ff6969afe4b98d3","kind":"field_change","created_at":"2026-08-28T10:59:18.865497151Z","actor":"Sam Catlow","issue_id":"archie-core-1786637496320-249-be6d9a20.1","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Slice 1 of cron/scheduling epic landed: per-profile JSON store with cross-process flock, merge-semantic Update, version-stamped schema, ErrCorruptFile on truncated files, ErrUnsupportedSchema on forward versions. Implements scheduling.JobSource so the ticker engine can poll it without knowing the file layout. Adversarial review applied: deep-copy Get/List, pool validation in Create/Update, ErrScheduleUnsupported on Once MarkRun, 0o600 file mode, SetEscapeHTML(false) for operator-readable files, fsync before rename for durability, ErrClosed sentinel after Close, real cross-process flock test via os/exec. task check green."}}
{"id":"int-2cfa12d6d6ab2555475033ca3c3d4a48","kind":"field_change","created_at":"2026-08-31T10:03:46.34399459Z","actor":"Sam Catlow","issue_id":"archie-core-bas7","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Added missing test + CLAUDE.md reference to ARCHITECTURE.md#plugin-engine-rule-strict"}}
{"id":"int-4ed850ca96fe030bea8ccc85ffb14dd6","kind":"field_change","created_at":"2026-08-31T10:04:10.364314672Z","actor":"Sam Catlow","issue_id":"archie-core-1sjk","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"go.mod already at 1.27.0 (supersedes 1.26.6 CVE fix); bumped both Dockerfiles from golang:1.26-trixie to golang:1.27-trixie to match"}}
{"id":"int-1c8f871a9893894d6a38b38a8cdc4dc5","kind":"field_change","created_at":"2026-08-31T10:04:52.887508436Z","actor":"Sam Catlow","issue_id":"archie-core-2tqh","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Reconciled migration-decisions.md with actual tree: confirmed curator/mapping/scheduling as legitimate domains (were undocumented, not misplaced), documented that identity/agent/messaging/plugin are approved-but-unmaterialised targets rather than creating dead stub packages"}}
{"id":"int-f073a26e120e051d468475af5b40944f","kind":"field_change","created_at":"2026-08-31T10:05:31.24577816Z","actor":"Sam Catlow","issue_id":"archie-core-zq4l","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Switched CI to actions/setup-go go-version-file: go.mod so CI's Go version is always sourced from go.mod directly, eliminating drift"}}
{"id":"int-3efcffdcd23615693655eca568c69456","kind":"field_change","created_at":"2026-08-31T10:05:53.315558477Z","actor":"Sam Catlow","issue_id":"archie-core-0bvr","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Added 'task vuln' (govulncheck) to Taskfile, deliberately kept out of task check since it needs network access to the vuln DB; wired as a separate CI step in deploy.yml"}}
{"id":"int-864ce794c14f56fd0c16c4502c964c4b","kind":"field_change","created_at":"2026-08-31T10:06:41.867659939Z","actor":"Sam Catlow","issue_id":"archie-core-tnsr","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"go.mod already on ai-sdk v0.1.30. Refactored pluginToolSet and scriptToolSet in internal/agentexec/loop_runner.go to use NewTypedTool instead of hand-written JSON Schema + manual unmarshal; tests pass"}}
{"id":"int-63772b74965b7fe43a50198a54f568d8","kind":"field_change","created_at":"2026-08-31T10:09:58.63859751Z","actor":"Sam Catlow","issue_id":"archie-core-p3wt","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Duration and TaskEnvelope were already consistent by the time this was picked up; fixed the remaining recvcheck violation on Provenance (Paths/String moved to pointer receiver to match the mutating record() method). All Provenance uses are through addressable struct fields, so build/tests are unaffected. recvcheck now reports 0 issues."}}
{"id":"int-9eeadba2e982ae4000e6dd37aaea420e","kind":"field_change","created_at":"2026-08-31T10:10:50.270527399Z","actor":"Sam Catlow","issue_id":"archie-core-d66k","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Added internal/gateway, internal/tools, internal/memory, internal/secret, internal/plugin, internal/skill to ARCHITECTURE.md Package Map with LOC and role descriptions"}}
{"id":"int-f575951da73a5707c81493b368531413","kind":"field_change","created_at":"2026-08-31T10:12:25.271511127Z","actor":"Sam Catlow","issue_id":"archie-core-g1y3","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Resolved migration-decisions.md's open Session/Messaging decision: keep internal/gateway as-is rather than risk a big-bang rewrite of live session/compression/approval/branch logic. Materialised internal/domain/messaging with the already-settled canonical Message/Conversation/ToolCall/ToolResult types (composite Conversation identity, immutable MessageID, branch lineage), with tests. Actual gateway migration onto these types is tracked as sequenced follow-up bd issues (d9dv, 4hof, o4e4, h3w2, label messaging-migration) so each channel lands with its own verification."}}
{"id":"int-d6e7e2aa2c469fd389151e0202b5a036","kind":"field_change","created_at":"2026-08-31T11:27:14.46134892Z","actor":"Sam Catlow","issue_id":"archie-core-kg1w","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Extracted the full cmd/archied wiring package into internal/app/archied (matching the sibling internal/app/agentworker pattern); cmd/archied/main.go is now 18 lines (codesearch-helper dispatch + call into archied.Run()). Fixed two architecture tests still hardcoded to the old cmd/archied path. task check passes clean."}}
{"id":"int-d9b75b37f0500c88f598cd75d42bba9d","kind":"field_change","created_at":"2026-08-31T11:27:20.577217872Z","actor":"Sam Catlow","issue_id":"archie-core-k7y7","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Raised coverage: workintake 14.3%->94.6%, secret/enginehost 0%->100%, secret/secretextract 10%->100%, forge 36.1%->77.0%, natsrpc 28.3%->91.3%. Committed as bc5b355."}}
{"id":"int-23a20b34ab857979d0935531ac8483b7","kind":"field_change","created_at":"2026-08-31T11:36:16.676339656Z","actor":"Sam Catlow","issue_id":"archie-core-agui","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"All 31 original findings (5 cyclop, 9 gocognit, 1 gocyclo, 2 nestif, plus incidental funlen) resolved via targeted extraction across tools/builtin, gateway, workflow, webui, telegram, cronstore, tomlwrite, agentexec. Remaining 6 lint findings (containedctx/errorlint/noctx/staticcheck) were never part of this bead's scope."}}
{"id":"int-659ff8bb1ef5160f8bc3f1e3f31d3d75","kind":"field_change","created_at":"2026-08-31T11:51:41.85053027Z","actor":"Sam Catlow","issue_id":"archie-core-h019.3","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Implemented as agent.Subagent inside the task-scoped archie-agent worker (internal/app/agentworker/review.go). Conversation isolation is structural (Subagent.Run only sends a prompt, never message history -- verified against a fake chat.Provider). Workspace isolation via new worktree.Manager.Snapshot (.git-free export of HEAD's tracked files into a scratch dir beside the task worktree). Reviewer's toolset is read-only (read/grep/find) rooted at the snapshot, never the worker's own toolset -- verified as a construction fact that the toolset contains no write/edit/shell tool and cannot read outside the snapshot dir. Findings captured via a typed record_finding tool appending to a slice the stage owns, surviving a Subagent.Run error when findings were already captured."}}
{"id":"int-b0d4496e53ae09d1926495a2215fff13","kind":"field_change","created_at":"2026-08-31T11:51:43.090585774Z","actor":"Sam Catlow","issue_id":"archie-core-h019.4","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"StageReview wired into the implement workflow between StageDiffCap and StageOpenPR. Fail-closed: not-run or a confirmed error-level finding parks (store.StatusParked) with findings in Detail; warn/plausible findings never block. Inert unless Repo.ReviewEnabled (new config field, default false); Models[\"reviewer\"] falls back to Models[\"builder\"]. task check clean, golangci-lint clean. Committed 8db8a17."}}
+3 -2
View File
@@ -63,8 +63,8 @@
{"_type":"issue","id":"archie-core-7d5u.2","title":"Reaction delivery via embedded NATS, no external server required","description":"Reactions need at-least-once delivery distinct from the lossy events.Bus (see epic description). The delivery mechanism is NATS -- that part is settled, not a design question. What's open is deployment shape.\n\nVERIFIED 2026-08-22: config.NATSConfig.URL empty currently means 'no NATS, use SQLite ClaimNext' (internal/config/config.go:573-582). That fallback was designed for task distribution working without a broker at all. It was never meant to generalise to 'archie has no NATS' as a permanent architectural stance -- the intended second deployment shape alongside an external NATS server was always NATS EMBEDDED (in-process), not a different eventbus.\n\ngithub.com/nats-io/nats-server/v2 is already a direct dependency and is proven to work in this codebase: internal/infrastructure/agenttransport/nats/transport_test.go and others already start a real embedded server via nats-server/v2/test for tests. It has just never been wired into production startup -- cmd/archied only knows 'external URL configured' vs 'fall back to SQLite'. No new library, no new bus, no architectural gap to design around: this is 'wire the dependency we already have and already test against into the daemon's own startup path.'\n\nDesign questions that remain, now correctly scoped: does an embedded NATS instance replace the SQLite fallback outright for single-process deployments, or run alongside it; what config controls embedded vs external vs disabled; does the daemon own the embedded server's lifecycle the same way it owns everything else (start/stop paired with daemon start/stop, per the shutdown-ordering rules in ARCHITECTURE.md).","acceptance_criteria":"A single-process deployment with no external NATS URL configured still gets reaction delivery via an embedded NATS instance; the daemon starts and stops the embedded server as part of its own lifecycle; no second eventbus type is introduced; internal/infrastructure/eventbus/nats is reused as the transport rather than duplicated.","notes":"2026-08-22, from docs/prds/event-sources-and-reactions.md: do not reuse the existing nats.Client's stream creation as-is. internal/infrastructure/eventbus/nats/client.go:65 hardcodes Retention: jetstream.WorkQueuePolicy -- correct for ARCHIE_TASKS (task distribution, one consumer claims each message) and wrong for reactions, which need fan-out (every registered reaction sees every matching event). Two reactions on overlapping subjects under WorkQueuePolicy hit the exact trap CLAUDE.md documents: the second consumer silently gets nothing. Config.StreamName/Config.Subjects are already composition-supplied (config.go:30-38); Retention is not parameterized and needs to become a Config field, defaulting to today's WorkQueuePolicy so ARCHIE_TASKS is unaffected, with reactions getting a second stream under a fan-out-capable policy and their own subject namespace.","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-21T13:26:26Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:10Z","started_at":"2026-08-21T18:57:41Z","closed_at":"2026-08-21T19:18:55Z","close_reason":"Embedded NATS wired into production startup: mode=embedded/external/off resolves from url, daemon owns the in-process server lifecycle, Retention parameterized for a future fan-out reaction stream. task check + lint clean; adversarial review zero surviving findings. Committed 2c7db34.","external_ref":"https://github.com/samcharles93/archie-core/issues/545","dependencies":[{"issue_id":"archie-core-7d5u.2","depends_on_id":"archie-core-7d5u","type":"parent-child","created_at":"2026-08-21T23:26:26Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-7d5u.2","depends_on_id":"archie-core-7d5u.1","type":"blocks","created_at":"2026-08-21T23:26:57Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-7d5u.3","title":"Shared webhook mechanics: HMAC verification, per-source rate limiting, payload redaction","description":"NARROWED 2026-08-22 from this bead's prior scope, which bundled capture-storage and an approval state machine into a single 'shared mechanics' package. On reflection those are not genuinely shared yet:\n\n- Capture STORAGE is t2db.1's job -- it depends on the NATS-vs-SQLite decision 7d5u.2 owns, and building a storage engine here would either duplicate or contradict that. This package may be USED by t2db.1's capture path, but does not own persistence.\n- The draft/pending_approval/armed state machine belongs to the entity that has that state -- t2db.4's binding -- not a generic package. There is exactly one consumer (bindings) today; per 'extract into a shared primitive on the second real consumer, never in anticipation of one,' building it here now would be speculative.\n\nWhat remains, and is genuinely storage-agnostic and reusable by any inbound HTTP source regardless of what consumes it:\n\n1. HMAC-SHA256 verification -- generalize internal/channels/webhook/webhook.go's existing unexported validateHMAC into an exported function here, and have that package call into it instead of keeping its own copy. One implementation of signature checking, not two that can drift.\n2. Per-source rate limiting -- a token bucket keyed by source ID (not global), so one noisy sender cannot exhaust another's budget. Limit-exceeded is an observable rejection, not a silent drop, per t2db.5's decision.\n3. Payload redaction -- generalize internal/gateway/stream.go's unexported sensitiveParameterKey/redactToolParameters heuristic (matches token/secret/password/passwd/api_key/apikey/authorization/credential/cookie/private_key against normalized JSON keys) into a reusable, storage-agnostic transform any capture path can apply before persisting.","acceptance_criteria":"webhookguard.VerifyHMAC replaces internal/channels/webhook's private copy with no behaviour change (its existing tests still pass); a per-source rate limiter rejects over-budget requests observably; a redaction function matches the same key heuristic already proven in gateway/stream.go; the package has zero imports of any domain, infrastructure or app package.","notes":"--notes=2026-08-22: merged to main as f3d3d32 (PR #534, squash of aa23ac9+46401ab+ce4f945).","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-21T13:26:26Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:11Z","started_at":"2026-08-21T15:19:09Z","closed_at":"2026-08-21T15:26:01Z","close_reason":"Built internal/webhookguard: VerifyHMAC (behavior-preserving extraction from internal/channels/webhook, which now calls it instead of keeping a private copy), RateLimiter (per-source token bucket, independent budgets, observable rejection), RedactPayload (key-name heuristic matching gateway/stream.go's marker list, but -- deliberately unlike that function -- redacts only values under sensitive keys and leaves ordinary strings/numbers/bools untouched, since a captured payload exists to be inspected for field mapping in t2db.3).\n\nAll four acceptance criteria met and independently confirmed by a fresh adversarial review with zero surviving findings: HMAC extraction is byte-for-byte behavior-preserving (diffed against the deleted function); rate limiter hand-traced correct on two scenarios plus race-clean under -race; redaction's divergence from gateway/stream.go verified by reading both functions side by side; zero non-stdlib imports confirmed by grep. The reviewer also mutation-tested both the redaction and rate-limit guards (disabled each in turn) and confirmed the test suite catches both, then reverted and re-verified go test -race and git status were clean.\n\ntask check exit 0, golangci-lint 0 issues (one forcetypeassert finding was caught and fixed properly during build, not suppressed), gofumpt clean. All 10 pre-existing internal/channels/webhook tests pass unmodified; the one now-redundant unit test was removed with a comment pointing to where its coverage relocated.","external_ref":"https://github.com/samcharles93/archie-core/issues/546","dependencies":[{"issue_id":"archie-core-7d5u.3","depends_on_id":"archie-core-1786637497036-275-8838629e","type":"relates-to","created_at":"2026-08-21T23:27:06Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-7d5u.3","depends_on_id":"archie-core-7d5u","type":"parent-child","created_at":"2026-08-21T23:26:26Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-7d5u.3","depends_on_id":"archie-core-7d5u.1","type":"blocks","created_at":"2026-08-21T23:26:58Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-7d5u","title":"[EPIC] Event sources and typed reactions: archie as an extensible platform","description":"Goal: let archie react to things happening -- forge activity, inbound callers, schedules -- and let extensions hook those reactions, without a generic untyped event bus.\n\nTwo findings shape this, both verified in the tree on 2026-08-21.\n\n1. ARCHIE HAS TWO EVENT NEEDS AND ONE BUS. internal/events is documented as 'archied's in-process observability stream' with 'bounded per-subscriber buffers that DROP on overflow, so a stalled dashboard connection can never apply backpressure to the task engine'. Publish is fire-and-forget; subscribers get a read-only channel and cannot influence anything. Correct for the dashboard, wrong for reactions: a hook that silently misses events under load and cannot affect an outcome is worse than no hook, because it looks like it ran. Reactions need at-least-once delivery and the ability to change what happens. Do not bolt reactions onto events.Bus.\n\n2. THE OBVIOUS DESIGN IS PROHIBITED, DELIBERATELY. The tau model this is drawn from dispatches generically: DispatchEvent(ctx, eventName string, sessionID, ...) to out-of-process gRPC plugins. archie's approved foundation (docs/architecture/plugins-and-extensions.md) forbids that shape -- the generic plugin contract stays metadata-only and MUST NOT expose untyped hooks. plugin.Plugin is Name()/Version() only, enforced by internal/plugin/architecture_test.go and by the plugin engine rule in ARCHITECTURE.md. tau already carries the scar the rule avoids: TestUnload_DoesNotWaitForInFlightDispatch exists because a stuck plugin blocked plugin unload.\n\nThe reconciliation, and why this is an epic rather than a feature: separate INBOUND (callers push work in -- forge webhook, chat webhook, cron, channel) from REACTION (extensions respond to something that happened). Inbound becomes a typed source/intake capability family with an owning registry. Reactions become typed capability families owned by the domain whose semantics they affect. 'Webhooks aligned to types of callers' is exactly the typed-family model applied to intake: the instinct is right, the generic bus is what has to go.\n\nNear-term payoff: archie reacts to an issue being labelled the moment it happens, instead of up to poll_interval later.","acceptance_criteria":"A forge webhook triggers work behind a feature flag with polling still available as a backstop; inbound callers register through one typed family rather than bespoke wiring per caller; reactions have delivery guarantees distinct from the lossy observability bus; the generic plugin contract remains metadata-only and internal/plugin/architecture_test.go still passes.","notes":"CORRECTION 2026-08-22 (second): the earlier summary I gave characterized 'NATS is currently optional' as an open architectural gap for this epic to navigate around. That's wrong, and Sam corrected it directly: NATS was never meant to be optional as a technology. What's optional is running a standalone NATS SERVER -- config.NATSConfig.URL empty falls back to the existing SQLite ClaimNext flow (internal/config/config.go:573-582, internal/infrastructure/eventbus/nats/doc.go:24). The intended second deployment shape is NATS EMBEDDED (in-process, no external server to stand up), not 'no NATS, use some other eventbus'. There is no other eventbus in scope, was never meant to be one, and this epic must not introduce one.\n\nCurrent code state, verified: github.com/nats-io/nats-server/v2 (the embeddable NATS server package) is already a direct, non-indirect dependency, and is genuinely used to spin up an in-process server -- but only inside _test.go files (internal/infrastructure/agenttransport/nats/transport_test.go and others use github.com/nats-io/nats-server/v2/test to run tests against a real embedded server). It has never been wired into production as an actual deployment mode. So embedded NATS is proven to work in this codebase's own test harness, and the gap is purely that production startup only knows 'external URL configured' vs 'no NATS, fall back to SQLite' -- there is no production code path that starts nats-server in-process.\n\nThis changes 7d5u.2 (reaction delivery) materially: 'ride the existing NATS eventbus, or a second in-process bus' was the wrong framing. The actual question is whether reaction delivery requires an external NATS deployment or can run on an embedded NATS instance so single-process deployments still get it -- not whether to use NATS at all versus some other bus. If embedded NATS is wired for reaction delivery, capture (t2db.1) gets it too essentially for free, since they were flagged as needing the same underlying decision.","status":"open","priority":1,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-08-21T13:25:57Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:11Z","external_ref":"https://github.com/samcharles93/archie-core/issues/547","dependenLine truncated
{"_type":"issue","id":"archie-core-h019.3","title":"Reviewer runs in a context that provably never saw the implementation","description":"A reviewer that shares the implementer's context is a second opinion from the same mind, and it will rationalise the same mistakes -- the failure mode CLAUDE.md's \"never self-certified by the implementer\" rule exists to prevent.\n\nUNBLOCKED 2026-08-25. The mechanism is decided in docs/prds/adversarial-self-review.md section 1 (rewritten, superseding the version q15y invalidated): the reviewer is an `agent.Subagent` run from inside the task-scoped archie-agent worker. ai-sdk v0.1.22 is already the pinned version, so no SDK bump. This adds no host executor, no second Pool.Acquire and no nested container lifecycle -- the open question the supersession left.\n\nTwo isolations are required and only one is free:\n\n- CONVERSATION isolation is structural. `Subagent.Run` (agent/subagent.go:76-96) calls GenerateText with Prompt set and Messages never populated, so the implementer's history has no code path into the nested run. This is the property to assert in the required test.\n- WORKSPACE isolation is ours to build. A sub-agent shares the parent's process, working directory and credentials, so the `.git`-free snapshot survives from the original design and is load-bearing: `git archive \u003ccommit\u003e | tar -x` into a fresh scratch directory BESIDE the task worktree, plus `diff.patch` and `issue.md`. Stripping `.git` is what makes commit messages, branch name and reflog structurally unreachable rather than merely undisclosed.\n\nThree construction rules:\n1. `Subagent.Tools` gets a distinct read-only toolset rooted at the snapshot. NEVER the worker's own toolset -- it carries the worktreerpc publication grant, so a reviewer holding it could push the branch it exists to block.\n2. Call `Run()`, not `Tool()`. `Tool()` would let the implementer's own model elect to review itself, which is the self-certification this feature prevents. It also avoids Tool()'s two-step-parent and recursion footguns.\n3. Findings return via a closure-captured capture tool, not the return value -- `Run` yields only text. Because the sub-agent is in-process, the capture tool's Go func appends to a []workflow.ReviewFinding the stage owns. Read that slice EVEN WHEN `Run` returns an error: findings already captured survive, so a reviewer that logged three defects then hit its step limit still yields those three.\n\n## Acceptance Criteria\n\nThe reviewer is launched with only the snapshot, diff.patch and issue.md; a test fails if implementer context reaches it, asserting isolation as a construction fact rather than prompt text; the reviewer's prompt instructs it to assume every line is wrong until proven correct; the mechanism reuses agent.Subagent inside the existing worker rather than inventing a second execution path; the reviewer's toolset is read-only, rooted at the snapshot, and provably excludes the worktreerpc publication grant; captured findings are recovered even when Run returns an error.\n","acceptance_criteria":"The reviewer is launched with only diff + issue; a test fails if implementer context reaches it; the reviewer's prompt instructs it to assume every line is wrong until proven correct; the mechanism reuses the existing container/worktree isolation rather than inventing a second one.","notes":"BLOCKED 2026-08-24: not implementable as specified. docs/prds/adversarial-self-review.md is marked 'Superseded; requires redesign before implementation' -- superseded by the full-task worker boundary landed in archie-core-q15y. Its mechanism for this bead was a daemon-side second container.Pool.Acquire plus an in-process agentexec path; q15y.2 and q15y.3 removed BOTH call sites, so the isolation mechanism this bead reuses no longer exists. Needs a design decision first: how a fresh reviewer receives a .git-stripped snapshot from INSIDE the existing task-scoped archie-agent worker, without introducing a host executor or a nested container lifecycle. Do not implement against the superseded PRD. The sibling bead h019.2 (findings contract) is unaffected and is being implemented, since it is a pure domain type with no execution dependency.","status":"in_progress","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-21T13:02:54Z","created_by":"Sam Catlow","updated_at":"2026-08-25T15:06:11Z","started_at":"2026-08-25T15:06:11Z","lease_expires_at":"2026-08-25T15:11:11Z","heartbeat_at":"2026-08-25T15:06:11Z","external_ref":"https://github.com/samcharles93/archie-core/issues/548","dependencies":[{"issue_id":"archie-core-h019.3","depends_on_id":"archie-core-h019","type":"parent-child","created_at":"2026-08-21T13:02:54Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.3","depends_on_id":"archie-core-h019.1","type":"blocks","created_at":"2026-08-21T13:03:25Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"depeLine truncated
{"_type":"issue","id":"archie-core-h019.4","title":"Wire review as an implement-workflow stage: after gates, before PR open","description":"Sequence matters. The review runs after gates pass -- there is no point reviewing code that does not build or test -- and before the PR is opened, because the point is to not spend the operator's attention on a PR that is not ready. The slot is between StageDiffCap() and StageOpenPR() in internal/domain/workflow/implement.go.\n\nA surviving CONFIRMED finding must not open a PR. Per CLAUDE.md, a finding that survives blocks closing the work; it does not get waved through.\n\nLIFECYCLE CORRECTION (2026-08-25): this bead previously said \"parks the task as waiting_human\", which names two different states in the actual machine (internal/taskstate/taskstate.go:44-59). docs/prds/adversarial-self-review.md section 4 decided this: use store.StatusParked, following StageDiffCap's existing precedent (steps.go:91-94) -- a stage-computed policy stop with a Detail explaining why, before PR open. Parked's available actions, retry and abandon, are the right shape: fix the flagged code and retry, or abandon/override a false positive. WaitingHuman's approve/reject actions have no referent here because there is no PR yet to approve or reject.\n\nBlocking is workflow.ReviewBlocking (shipped in h019.2): Verdict == confirmed AND Level == error. A PLAUSIBLE finding never blocks, however severe its level claims to be.\n\nFAIL-CLOSED (decided 2026-08-25): a review that fails to RUN is distinct from a review that ran and found nothing, and it must not open a PR. A sub-agent that errors, is truncated, or produces no conclusion yields ReviewStatusNotRun, for which Passed() is false and Blocking() is also false -- the contract deliberately refuses to guess, and this stage resolves it as park. Rationale: Repo.ReviewEnabled is opt-in, so an operator who turned the gate on wants the gate, and a provider outage silently degrading into \"PR opened unreviewed\" is what they were buying protection against. Accepted cost: a transient model error parks a task, and Parked's retry action is the remedy. The park Detail must say the review did not run, never that it passed.\n\nScope to the implement workflow first. Routing to tdd/bootstrap/feasibility is a later decision -- feasibility in particular produces a document rather than a diff, so \"review the diff\" may not even apply.\n\nAlso adds to internal/config: Models[\"reviewer\"] (falling back to Models[\"builder\"], no schema change) and Repo.ReviewEnabled bool (default false).\n\n## Acceptance Criteria\n\nAn implement task with a clean gate and no confirmed findings opens a PR as it does today; one with a surviving confirmed finding parks as store.StatusParked with findings recorded in Detail and opens no PR; a review that fails to run also parks, with a Detail that says so rather than implying a pass; a warn-level or plausible finding does not block; the stage is observable in the task's running(workflow:stage) status and emits task events despite the nested run being non-streaming; retry after operator action re-runs the stage; the stage is inert unless Repo.ReviewEnabled is true.\n","acceptance_criteria":"An implement task with a clean gate and no confirmed findings opens a PR as it does today; one with a surviving confirmed finding parks as waiting_human with findings recorded and opens no PR; the stage is observable in the task's running(workflow:stage) status; retry after operator action re-runs the review.","status":"open","priority":1,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-21T13:02:54Z","created_by":"Sam Catlow","updated_at":"2026-08-24T14:55:47Z","external_ref":"https://github.com/samcharles93/archie-core/issues/549","dependencies":[{"issue_id":"archie-core-h019.4","depends_on_id":"archie-core-h019","type":"parent-child","created_at":"2026-08-21T13:02:54Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.4","depends_on_id":"archie-core-h019.1","type":"blocks","created_at":"2026-08-21T13:03:25Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.4","depends_on_id":"archie-core-h019.2","type":"blocks","created_at":"2026-08-21T13:03:25Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.4","depends_on_id":"archie-core-h019.3","type":"blocks","created_at":"2026-08-21T13:03:26Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":3,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-h019.3","title":"Reviewer runs in a context that provably never saw the implementation","description":"A reviewer that shares the implementer's context is a second opinion from the same mind, and it will rationalise the same mistakes -- the failure mode CLAUDE.md's \"never self-certified by the implementer\" rule exists to prevent.\n\nUNBLOCKED 2026-08-25. The mechanism is decided in docs/prds/adversarial-self-review.md section 1 (rewritten, superseding the version q15y invalidated): the reviewer is an `agent.Subagent` run from inside the task-scoped archie-agent worker. ai-sdk v0.1.22 is already the pinned version, so no SDK bump. This adds no host executor, no second Pool.Acquire and no nested container lifecycle -- the open question the supersession left.\n\nTwo isolations are required and only one is free:\n\n- CONVERSATION isolation is structural. `Subagent.Run` (agent/subagent.go:76-96) calls GenerateText with Prompt set and Messages never populated, so the implementer's history has no code path into the nested run. This is the property to assert in the required test.\n- WORKSPACE isolation is ours to build. A sub-agent shares the parent's process, working directory and credentials, so the `.git`-free snapshot survives from the original design and is load-bearing: `git archive \u003ccommit\u003e | tar -x` into a fresh scratch directory BESIDE the task worktree, plus `diff.patch` and `issue.md`. Stripping `.git` is what makes commit messages, branch name and reflog structurally unreachable rather than merely undisclosed.\n\nThree construction rules:\n1. `Subagent.Tools` gets a distinct read-only toolset rooted at the snapshot. NEVER the worker's own toolset -- it carries the worktreerpc publication grant, so a reviewer holding it could push the branch it exists to block.\n2. Call `Run()`, not `Tool()`. `Tool()` would let the implementer's own model elect to review itself, which is the self-certification this feature prevents. It also avoids Tool()'s two-step-parent and recursion footguns.\n3. Findings return via a closure-captured capture tool, not the return value -- `Run` yields only text. Because the sub-agent is in-process, the capture tool's Go func appends to a []workflow.ReviewFinding the stage owns. Read that slice EVEN WHEN `Run` returns an error: findings already captured survive, so a reviewer that logged three defects then hit its step limit still yields those three.\n\n## Acceptance Criteria\n\nThe reviewer is launched with only the snapshot, diff.patch and issue.md; a test fails if implementer context reaches it, asserting isolation as a construction fact rather than prompt text; the reviewer's prompt instructs it to assume every line is wrong until proven correct; the mechanism reuses agent.Subagent inside the existing worker rather than inventing a second execution path; the reviewer's toolset is read-only, rooted at the snapshot, and provably excludes the worktreerpc publication grant; captured findings are recovered even when Run returns an error.\n","acceptance_criteria":"The reviewer is launched with only diff + issue; a test fails if implementer context reaches it; the reviewer's prompt instructs it to assume every line is wrong until proven correct; the mechanism reuses the existing container/worktree isolation rather than inventing a second one.","notes":"BLOCKED 2026-08-24: not implementable as specified. docs/prds/adversarial-self-review.md is marked 'Superseded; requires redesign before implementation' -- superseded by the full-task worker boundary landed in archie-core-q15y. Its mechanism for this bead was a daemon-side second container.Pool.Acquire plus an in-process agentexec path; q15y.2 and q15y.3 removed BOTH call sites, so the isolation mechanism this bead reuses no longer exists. Needs a design decision first: how a fresh reviewer receives a .git-stripped snapshot from INSIDE the existing task-scoped archie-agent worker, without introducing a host executor or a nested container lifecycle. Do not implement against the superseded PRD. The sibling bead h019.2 (findings contract) is unaffected and is being implemented, since it is a pure domain type with no execution dependency.","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-21T13:02:54Z","created_by":"Sam Catlow","updated_at":"2026-08-31T11:51:42Z","started_at":"2026-08-25T15:06:11Z","closed_at":"2026-08-31T11:51:42Z","close_reason":"Implemented as agent.Subagent inside the task-scoped archie-agent worker (internal/app/agentworker/review.go). Conversation isolation is structural (Subagent.Run only sends a prompt, never message history -- verified against a fake chat.Provider). Workspace isolation via new worktree.Manager.Snapshot (.git-free export of HEAD's tracked files into a scratch dir beside the task worktree). Reviewer's toolset is read-only (read/grep/find) rooted at the snapshot, never the worker's oLine truncated
{"_type":"issue","id":"archie-core-h019.4","title":"Wire review as an implement-workflow stage: after gates, before PR open","description":"Sequence matters. The review runs after gates pass -- there is no point reviewing code that does not build or test -- and before the PR is opened, because the point is to not spend the operator's attention on a PR that is not ready. The slot is between StageDiffCap() and StageOpenPR() in internal/domain/workflow/implement.go.\n\nA surviving CONFIRMED finding must not open a PR. Per CLAUDE.md, a finding that survives blocks closing the work; it does not get waved through.\n\nLIFECYCLE CORRECTION (2026-08-25): this bead previously said \"parks the task as waiting_human\", which names two different states in the actual machine (internal/taskstate/taskstate.go:44-59). docs/prds/adversarial-self-review.md section 4 decided this: use store.StatusParked, following StageDiffCap's existing precedent (steps.go:91-94) -- a stage-computed policy stop with a Detail explaining why, before PR open. Parked's available actions, retry and abandon, are the right shape: fix the flagged code and retry, or abandon/override a false positive. WaitingHuman's approve/reject actions have no referent here because there is no PR yet to approve or reject.\n\nBlocking is workflow.ReviewBlocking (shipped in h019.2): Verdict == confirmed AND Level == error. A PLAUSIBLE finding never blocks, however severe its level claims to be.\n\nFAIL-CLOSED (decided 2026-08-25): a review that fails to RUN is distinct from a review that ran and found nothing, and it must not open a PR. A sub-agent that errors, is truncated, or produces no conclusion yields ReviewStatusNotRun, for which Passed() is false and Blocking() is also false -- the contract deliberately refuses to guess, and this stage resolves it as park. Rationale: Repo.ReviewEnabled is opt-in, so an operator who turned the gate on wants the gate, and a provider outage silently degrading into \"PR opened unreviewed\" is what they were buying protection against. Accepted cost: a transient model error parks a task, and Parked's retry action is the remedy. The park Detail must say the review did not run, never that it passed.\n\nScope to the implement workflow first. Routing to tdd/bootstrap/feasibility is a later decision -- feasibility in particular produces a document rather than a diff, so \"review the diff\" may not even apply.\n\nAlso adds to internal/config: Models[\"reviewer\"] (falling back to Models[\"builder\"], no schema change) and Repo.ReviewEnabled bool (default false).\n\n## Acceptance Criteria\n\nAn implement task with a clean gate and no confirmed findings opens a PR as it does today; one with a surviving confirmed finding parks as store.StatusParked with findings recorded in Detail and opens no PR; a review that fails to run also parks, with a Detail that says so rather than implying a pass; a warn-level or plausible finding does not block; the stage is observable in the task's running(workflow:stage) status and emits task events despite the nested run being non-streaming; retry after operator action re-runs the stage; the stage is inert unless Repo.ReviewEnabled is true.\n","acceptance_criteria":"An implement task with a clean gate and no confirmed findings opens a PR as it does today; one with a surviving confirmed finding parks as waiting_human with findings recorded and opens no PR; the stage is observable in the task's running(workflow:stage) status; retry after operator action re-runs the review.","status":"closed","priority":1,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-08-21T13:02:54Z","created_by":"Sam Catlow","updated_at":"2026-08-31T11:51:43Z","closed_at":"2026-08-31T11:51:43Z","close_reason":"StageReview wired into the implement workflow between StageDiffCap and StageOpenPR. Fail-closed: not-run or a confirmed error-level finding parks (store.StatusParked) with findings in Detail; warn/plausible findings never block. Inert unless Repo.ReviewEnabled (new config field, default false); Models[\"reviewer\"] falls back to Models[\"builder\"]. task check clean, golangci-lint clean. Committed 8db8a17.","external_ref":"https://github.com/samcharles93/archie-core/issues/549","dependencies":[{"issue_id":"archie-core-h019.4","depends_on_id":"archie-core-h019","type":"parent-child","created_at":"2026-08-21T13:02:54Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.4","depends_on_id":"archie-core-h019.1","type":"blocks","created_at":"2026-08-21T13:03:25Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.4","depends_on_id":"archie-core-h019.2","type":"blocks","created_at":"2026-08-21T13:03:25Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.4","depends_on_id":"archie-core-h019.3","type":"blocks","created_at":"2026-08-21T13:03:26Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":3,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-h019.1","title":"Design: adversarial self-review stage (one-page decision in docs/prds/)","description":"No settled design exists for this in docs/architecture/, so under the scope-discipline rule merged as PR #533 the design comes first -- briefly and decisively -- and is not finished until a diff follows it.\n\nDecide and record, in one page under docs/prds/: where the reviewer runs (reuse the per-task container pool, or a separate short-lived container); what it is given (diff plus originating issue, and explicitly what it must NOT be given); the findings contract and who owns the type; what a surviving finding does to the task lifecycle; and how the reviewer's model/effort is configured.\n\nConstraints from the repo that the design must respect: dependency direction is cmd -\u003e app -\u003e {domain, infrastructure}, so the reviewer contract belongs to the workflow domain and the execution to infrastructure/app. Agent execution is a data boundary. The model never runs git. Prefer environmental enforcement over prompt rules -- 'the reviewer cannot see the implementation' must be a property of how it is launched, not an instruction in its prompt.\n\nDo not write an architecture document, migration plan or review campaign. One page that decides.","acceptance_criteria":"A one-page decision exists under docs/prds/ answering: reviewer isolation mechanism, inputs and forbidden inputs, findings contract owner, lifecycle effect of a surviving finding, and model/effort configuration. It decides rather than surveys, and cites the packages it will touch.","status":"closed","priority":1,"issue_type":"decision","owner":"sam@catlow.tech","created_at":"2026-08-21T13:02:39Z","created_by":"Sam Catlow","updated_at":"2026-08-24T07:12:05Z","started_at":"2026-08-22T09:30:19Z","closed_at":"2026-08-24T07:12:05Z","close_reason":"One-page decision written at docs/prds/adversarial-self-review.md: reviewer runs in a second workspace (container or in-process) pointed at a .git-stripped snapshot of the reviewed commit, never the implementer's worktree; findings contract is workflow.ReviewFinding, owned by internal/domain/workflow, reported via a structured capture tool; a surviving error-level finding sets StatusParked (not WaitingHuman -- epic wording named two different states, this resolves which); model/effort reuse the existing Models[role] map and per-stage budget override, gated by a new opt-in Repo.ReviewEnabled so h019.4 doesn't gate every repo on an uncalibrated reviewer before h019.5 lands. [Closure restored 2026-08-24: originally closed 2026-08-22, lost when the beads DB was rebuilt (.beads.backup-pre-recovery).]","external_ref":"https://github.com/samcharles93/archie-core/issues/550","metadata":null,"dependencies":[{"issue_id":"archie-core-h019.1","depends_on_id":"archie-core-h019","type":"parent-child","created_at":"2026-08-21T13:02:39Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":5,"comment_count":0}
{"_type":"issue","id":"archie-core-h019.2","title":"Findings contract: a structured review result the workflow can act on","description":"The reviewer's output must be data the workflow can branch on, not prose a human has to read to find out whether the PR is safe to open. Prose is what makes a review advisory; structure is what lets a finding block.\n\nDefine the finding type in the workflow domain (the domain declares the contract it needs; it never names who implements it). At minimum a finding carries: file and line, a one-sentence defect, a concrete failure scenario (inputs/state -\u003e wrong output), a verdict distinguishing CONFIRMED from PLAUSIBLE, and a disposition once acted on (fixed / skipped / no_change_needed).\n\nThe CONFIRMED/PLAUSIBLE split is load-bearing and must not be collapsed into a single boolean: only confirmed findings may block, or the feature degrades into crying wolf and the operator learns to skim past it.","acceptance_criteria":"A finding type exists in internal/domain/workflow with file, line, summary, failure scenario, verdict and disposition; it is serialisable across the agent-execution data boundary; a review result with zero findings is representable and distinct from a review that did not run.","status":"closed","priority":1,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-21T13:02:39Z","created_by":"Sam Catlow","updated_at":"2026-08-24T09:15:56Z","started_at":"2026-08-24T08:57:20Z","closed_at":"2026-08-24T09:15:56Z","close_reason":"Implemented: workflow.ReviewFinding + ReviewReport in internal/domain/workflow/review_findings.go, merged 53bb841. The domain owns the type; gate.Finding was used as a shape precedent only, not reused, so the review contract is not coupled to the Yaegi gate's evolution. Blocking requires Verdict==confirmed AND Level==error, so a PLAUSIBLE finding never blocks however severe it claims to be. ReviewStatus makes 'ran and found nothing' structurally distinct from 'never ran' -- Passed() is false for a zero-value report, and the distinction does not rest on nil-vs-empty-slice. JSON round-trip covered; Line 0 is preserved (no omitempty) for whole-file findings. Review found and fixed a duplicate package doc comment and a redundant ReviewBlocking/BlockingReviewFindings alias pair. task check green. Fresh adversarial review clean across 8 dimensions; I independently mutation-tested the blocking rule: dropping the verdict check fails 5 tests (incl. plausible_error_MUST_NOT_block) and dropping the level check fails 5 more, so the tests genuinely pin both halves.","external_ref":"https://github.com/samcharles93/archie-core/issues/551","dependencies":[{"issue_id":"archie-core-h019.2","depends_on_id":"archie-core-h019","type":"parent-child","created_at":"2026-08-21T13:02:39Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-h019.2","depends_on_id":"archie-core-h019.1","type":"blocks","created_at":"2026-08-21T13:03:24Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":3,"comment_count":0}
{"_type":"issue","id":"archie-core-h019","title":"[EPIC] Adversarial self-review before archie opens a PR","description":"Archie enforces gates on every PR it opens, but it does not run the adversarial review CLAUDE.md makes mandatory for every change in this repo: a fresh reviewer that did not write the code, told to assume every line is wrong, working a defined checklist, where a surviving finding blocks the work. It is the one discipline the project requires of its contributors and exempts itself from.\n\nWhy it matters, with evidence rather than assertion: on 2026-08-20/21 the update-verification change (PR #530) passed task check at every checkpoint -- exit 0, golangci-lint 0 issues, gofumpt clean -- and three adversarial passes still found six real defects, two of them blocking. A 'dev' version placeholder would have reported healthy updates as failures, and an 'unknown' install claim was still being worded as confirmed success. The gates were green throughout and would have stayed green. This is CLAUDE.md's own recorded lesson: tests catch behaviour that breaks, not behaviour that quietly starts meaning something else.\n\nArchie is unusually well placed to do this. It already runs each task in an isolated container and worktree, so it can spawn a reviewer that genuinely never saw the implementation -- not a second opinion from the same context pretending to be fresh, which is the failure mode of every single-context tool. The isolation boundary built for safety is what makes honest self-review possible.\n\nWhat the operator gets: a PR that arrives with a findings section -- what was checked, what was found, what was fixed, what survived. A surviving finding parks the task as waiting_human instead of opening a PR that looks ready and is not. Review shifts from hunting for bugs to adjudicating findings.\n\nThe risk that kills the feature is a reviewer that cries wolf. Findings must be adversarially confirmed before they surface, and the reviewer must be able to report zero findings on properties it checked and cleared. Calibration is the feature, not the finding count.","acceptance_criteria":"An implement-workflow task runs an adversarial review after gates pass and before the PR is opened; the reviewer provably cannot see the implementer's context; a surviving confirmed finding blocks PR creation and parks the task; findings and their disposition are visible on the PR and the dashboard.","status":"open","priority":1,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-08-21T13:02:17Z","created_by":"Sam Catlow","updated_at":"2026-08-22T09:25:15Z","external_ref":"https://github.com/samcharles93/archie-core/issues/552","dependency_count":0,"dependent_count":0,"comment_count":0}
@@ -89,6 +89,7 @@
{"_type":"issue","id":"archie-core-g7tm","title":"telegram: finalize the reply through a live context, matching the error branch","description":"The success path calls live.finalize(turnCtx, reply) with the raw cancellable turn context (telegram.go:582), while the error branch two lines above deliberately uses context.WithoutCancel(turnCtx). If /stop lands during finalize, the rich edit, the plain-text retry, and the split-send fallback all abort with context.Canceled (go-telegram/bot builds requests with NewRequestWithContext), so the authoritative reply is never delivered and the live message keeps the ▌ cursor forever. The reply is persisted to the ledger, so the loss is delivery-level — but the user sees a frozen half-answer.\n\nFailure: a long tool-using turn is /stop-ped as it completes; turnCtx is cancelled mid-finalize; every send fails on the dead context; the chat shows the last live frame with a blinking cursor and no final answer.\n\nFound by code-review of PR #476 (feat/467, merged 98e8dda).","design":"live.finalize(context.WithoutCancel(turnCtx), reply) — the one-liner the error branch already uses. Consider making finalize take a live context internally rather than trusting each caller to remember.","acceptance_criteria":"A /stop landing mid-finalize still delivers the authoritative reply and drops the cursor; a test covers the cancellable-context finalize path.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-14T14:43:08Z","created_by":"Sam Catlow","updated_at":"2026-08-14T15:07:36Z","started_at":"2026-08-14T14:53:28Z","closed_at":"2026-08-14T15:03:28Z","close_reason":"Fixed in internal/channels/telegram/live.go and telegram.go: finalize/abandon strip context cancellation before sending (mirroring each other), ToolCall escapes Markdown metacharacters via bot.EscapeMarkdown, splitLongMessage splits on rune boundaries. All new/changed tests verified red-then-green; task check clean; adversarial review pass found no blocking issues.","external_ref":"https://github.com/samcharles93/archie-core/issues/484","labels":["code-review","streaming","telegram"],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-tb3a","title":"Fix streaming review blockers for inline tool calls","description":"Resolve the four evidence-gated findings in merged inline tool-call streaming: preserve the authoritative Telegram reply when final edits fail; keep Telegram network I/O off the model FullStream consumer and cancellable; correlate tool inputs with results and render a bounded redacted parameter summary; snapshot show_tool_calls per live reply to avoid reload races. Add regression tests for every path and run task check plus lint/race validation.","acceptance_criteria":"Regression tests fail on the merged implementation and pass after the fix. Final edit failure falls back to normal split delivery. Delta and ToolCall callbacks do not wait on Telegram HTTP and stop cancels in-flight rendering. Completed tool events include bounded redacted parameters correlated by tool-call ID. Reload cannot race an in-flight reply's show_tool_calls setting. task check passes, golangci-lint reports no new findings, and focused race tests pass.","notes":"Implemented in worktree /tmp/archie-core-tb3a on branch fix/archie-core-tb3a. Added cancellable async Telegram rendering, final edit failure fallback through normal split delivery, call-ID-correlated bounded conservative parameter summaries, atomic per-reply show_tool_calls snapshots, SSE/UI parameter rendering, rebuilt ui/dist, and regression tests. Validation: GOFLAGS=-buildvcs=false task check passed; golangci-lint --new-from-rev=HEAD ./... reported 0 issues; focused race suite passed; fresh adversarial reviewer reported PASS with zero findings. Plain task check is blocked in linked worktrees by Go VCS stamping exit 128, hence buildvcs override.\n2026-08-24 reconciliation: the close reason's 'worktree left uncommitted' is stale. The work did land on main via ba33527 (Merge pull request #477 from samcharles93/fix/archie-core-tb3a); verified on main: gateway/stream.go sensitiveParameterKey+redactToolParameters, telegram/live.go per-reply showToolCalls snapshot, webui/api_chat.go gating. The /tmp/archie-core-tb3a worktree and its branch are gone, as expected.\n","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-13T18:05:35Z","created_by":"Sam Catlow","updated_at":"2026-08-24T07:29:09Z","started_at":"2026-08-13T18:05:39Z","closed_at":"2026-08-13T18:35:26Z","close_reason":"Completed and independently reviewed; worktree left uncommitted per conservative repository policy.","external_ref":"https://github.com/samcharles93/archie-core/issues/485","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-dzx","title":"Remove duplicate archie-agent safe.directory setup","description":"## Problem\\ncmd/archie-agent/main.go configures git safe.directory inline and then calls markWorktreeSafe, so startup writes the same global git configuration twice.\\n\\n## Scope\\nKeep markWorktreeSafe as the single tested production path and remove the older inline exec.Command block/import. Add regression coverage proving startup wiring has exactly one authoritative safe-directory call.\\n\\n## Acceptance\\n- archie-agent startup invokes markWorktreeSafe exactly once\\n- no second inline safe.directory command remains in main.go\\n- cmd/archie-agent tests and repository quality gate pass","acceptance_criteria":"Single tested safe.directory setup path remains; duplicate inline command is removed; tests and task check pass","notes":"Red proof: TestMainConfiguresWorktreeSafetyOnce failed with 2 setup paths before implementation. Green proof: go test/vet/build ./cmd/archie-agent/... passed; golangci-lint --new-from-rev=HEAD reported 0 issues. Fresh adversarial review found no blockers. Full task check was not run because the working tree contains unrelated in-progress changes and task check rewrites files; scoped package gate used per repository protocol.","status":"closed","priority":1,"issue_type":"bug","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-13T16:10:09Z","created_by":"Sam Catlow","updated_at":"2026-08-13T16:13:48Z","started_at":"2026-08-13T16:10:24Z","closed_at":"2026-08-13T16:13:48Z","close_reason":"Removed duplicate inline safe.directory setup; markWorktreeSafe is now the single tested production path","external_ref":"https://github.com/samcharles93/archie-core/issues/470","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-r3gh","title":"Harden task origin response assertions","description":"Replace brittle prose substring assertions in internal/webui/api_tasks_origin_test.go with stable structural checks for HTTP error responses while preserving origin and media-type coverage.","acceptance_criteria":"The origin test does not assert human-readable response text; rejected cases verify stable HTTP error response structure; focused tests and task check pass.","status":"in_progress","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-08-31T12:49:20Z","created_by":"Sam Catlow","updated_at":"2026-08-31T12:49:27Z","started_at":"2026-08-31T12:49:27Z","lease_expires_at":"2026-08-31T12:54:27Z","heartbeat_at":"2026-08-31T12:49:27Z","dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-h3w2","title":"Migrate email/webhook channels onto domain/messaging types","description":"Update remaining gateway-based channels (email, webhook) to use domain/messaging types, completing the migration described in migration-decisions.md section 2.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-31T10:12:16Z","created_by":"Sam Catlow","updated_at":"2026-08-31T10:12:16Z","labels":["messaging-migration"],"dependencies":[{"issue_id":"archie-core-h3w2","depends_on_id":"archie-core-d9dv","type":"blocks","created_at":"2026-08-31T10:12:24Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-o4e4","title":"Migrate web UI / dashboard chat onto domain/messaging types","description":"Update internal/webui/ chat handling (api_chat.go and friends) to use domain/messaging types once gateway session storage is migrated. Verify SSE streaming and chat history are unaffected.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-31T10:12:15Z","created_by":"Sam Catlow","updated_at":"2026-08-31T10:12:15Z","labels":["messaging-migration"],"dependencies":[{"issue_id":"archie-core-o4e4","depends_on_id":"archie-core-d9dv","type":"blocks","created_at":"2026-08-31T10:12:23Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-4hof","title":"Migrate Telegram channel onto domain/messaging types","description":"Once gateway session storage uses domain/messaging types, update internal/channels/telegram/ to read/write through them instead of internal/gateway.Message directly. Verify no behavior change in message history, branching, or tool-call rendering.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-08-31T10:12:13Z","created_by":"Sam Catlow","updated_at":"2026-08-31T10:12:13Z","labels":["messaging-migration"],"dependencies":[{"issue_id":"archie-core-4hof","depends_on_id":"archie-core-d9dv","type":"blocks","created_at":"2026-08-31T10:12:22Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}