chore(beads): record archie-core-t2db.10 close interaction

This commit is contained in:
sam committed 2026-09-03 02:49:06 +10:00
1 parent 17e626dfba
commit 1a20a42a98
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -189,3 +189,4 @@
{"id":"int-1e0bb26c5c74b32f536c86752b696e17","kind":"field_change","created_at":"2026-09-02T14:24:02.393516241Z","actor":"Sam Catlow","issue_id":"archie-core-v9gv.2","extra":{"field":"status","new_value":"closed","old_value":"open"}}
{"id":"int-421fa6d2e329722271b29c6cc06e8aed","kind":"field_change","created_at":"2026-09-02T14:24:02.790015963Z","actor":"Sam Catlow","issue_id":"archie-core-v9gv.3","extra":{"field":"status","new_value":"closed","old_value":"open"}}
{"id":"int-3662b2644b20858f97cfe68e35970ee1","kind":"field_change","created_at":"2026-09-02T16:35:43.782983144Z","actor":"Sam Catlow","issue_id":"archie-core-t2db.9","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"kindWorkflows YAML override shipped, task check green"}}
{"id":"int-0522bb088937b3f0516dccfa59016dbc","kind":"field_change","created_at":"2026-09-02T16:46:13.808391215Z","actor":"Sam Catlow","issue_id":"archie-core-t2db.10","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Implemented and gate-verified as 93a5f3a (pushed to main)."}}
+2 -1
View File
@@ -91,7 +91,8 @@
{"_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-t2db.9","title":"workflow: make kind-to-workflow routing YAML-overridable","description":"First slice of the EDA playbook engine (docs/prds/eda-playbook-engine.md): make workflow/routing.go's kindWorkflows map overridable from an optional YAML file, so which workflow runs for an intake Kind is data instead of a Go literal. labelKinds/NATS subjects are explicitly out of scope for this slice (closed subject-per-kind question deferred).","acceptance_criteria":"Route() accepts an optional KindWorkflows override; a YAML file with the same shape as the built-in map overrides it; absent file/nil override falls back to today's hardcoded defaults unchanged; config gains an optional path field; task check passes.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-09-02T16:32:45Z","created_by":"Sam Catlow","updated_at":"2026-09-02T16:35:44Z","started_at":"2026-09-02T16:32:50Z","closed_at":"2026-09-02T16:35:44Z","close_reason":"kindWorkflows YAML override shipped, task check green","dependencies":[{"issue_id":"archie-core-t2db.9","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T16:32:45Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-t2db.10","title":"feat(workflow): route arbitrary forge labels to workflows via playbook YAML","description":"Second slice of docs/prds/eda-playbook-engine.md, complementing the kind-\u003eworkflow layer (WorkflowRoutingFile): the label vocabulary itself becomes playbook data. A label outside the closed bug/feature/bootstrap kind set (e.g. security) dispatches to a registered workflow from an optional WorkflowLabelsFile, instead of falling through to triage.\n\n- LabelWorkflows + LoadLabelWorkflowsYAML/SetLabelWorkflows in internal/domain/workflow/routing.go, mirroring the kind layer's once-at-startup lifecycle. The closed Kind/NATS-subject set is untouched; the map only extends binding authority for labels the kind layer does not own.\n- Collision rule per design doc: a label owned by the kind set, an empty label, an empty workflow name, or a duplicate binding is a reported load failure (dropped, logged, error returned to the caller) -- the schema defines what is accepted; nothing is silently arbitrated by schema/version.\n- Route() precedence: explicit t.Workflow -\u003e arbitrary-label binding -\u003e kind binding -\u003e triage -\u003e implement -\u003e default.\n- Config: WorkflowLabelsFile (workflow_labels_file), wired at boot alongside WorkflowRoutingFile; documented in config.example.toml.\n- PRD: records this slice's decisions (single-file shape, collision rule, precedence) so later slices stay anchored.\n\nCommitted as 93a5f3a and pushed to main.","design":"Follows the EDA playbook engine design doc (docs/prds/eda-playbook-engine.md). Open question 2 (config field shape) partially resolved: single file (workflow_labels_file) mirroring WorkflowRoutingFile and SkillsDir's single-path precedent; a directory remains open and larger. Data-flow/condition syntax (Q1), mid-run failure semantics and idempotency (design gaps 1-2) are explicitly out of this slice's scope per the PRD phasing -- they land with Module/Channel/Forge action kinds.","acceptance_criteria":"1. An issue labelled with an arbitrary label (not bug/feature/bootstrap) routes to the workflow bound in workflow_labels_file.\n2. No workflow_labels_file configured: kind-only routing unchanged (backward compatible).\n3. Colliding/empty/kind-owned labels in the file produce a reported load error, not silent arbitration.\n4. Route() precedence: explicit t.Workflow \u003e arbitrary-label binding \u003e kind binding \u003e triage \u003e implement \u003e default.\n5. task check is green; tests cover dispatch, collision, empties, nil-restore, and precedence.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T16:45:33Z","created_by":"Sam Catlow","updated_at":"2026-09-02T16:46:28Z","closed_at":"2026-09-02T16:46:14Z","close_reason":"Implemented and gate-verified as 93a5f3a (pushed to main).","external_ref":"https://github.com/samcharles93/archie-core/issues/701","dependencies":[{"issue_id":"archie-core-t2db.10","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T16:45:33Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-t2db.9","title":"workflow: make kind-to-workflow routing YAML-overridable","description":"First slice of the EDA playbook engine (docs/prds/eda-playbook-engine.md): make workflow/routing.go's kindWorkflows map overridable from an optional YAML file, so which workflow runs for an intake Kind is data instead of a Go literal. labelKinds/NATS subjects are explicitly out of scope for this slice (closed subject-per-kind question deferred).","acceptance_criteria":"Route() accepts an optional KindWorkflows override; a YAML file with the same shape as the built-in map overrides it; absent file/nil override falls back to today's hardcoded defaults unchanged; config gains an optional path field; task check passes.","status":"closed","priority":2,"issue_type":"task","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-09-02T16:32:45Z","created_by":"Sam Catlow","updated_at":"2026-09-02T16:46:28Z","started_at":"2026-09-02T16:32:50Z","closed_at":"2026-09-02T16:35:44Z","close_reason":"kindWorkflows YAML override shipped, task check green","external_ref":"https://github.com/samcharles93/archie-core/issues/702","dependencies":[{"issue_id":"archie-core-t2db.9","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T16:32:45Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-v9gv.2","title":"Refactor hyperscript el() usage to Preact JSX","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T13:37:19Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:07Z","closed_at":"2026-09-02T14:24:02Z","external_ref":"https://github.com/samcharles93/archie-core/issues/683","dependencies":[{"issue_id":"archie-core-v9gv.2","depends_on_id":"archie-core-v9gv","type":"parent-child","created_at":"2026-09-02T13:37:19Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-v9gv.3","title":"Update main entrypoint to mount via Preact render","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T13:37:19Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:07Z","closed_at":"2026-09-02T14:24:03Z","external_ref":"https://github.com/samcharles93/archie-core/issues/684","dependencies":[{"issue_id":"archie-core-v9gv.3","depends_on_id":"archie-core-v9gv","type":"parent-child","created_at":"2026-09-02T13:37:19Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-v9gv.1","title":"Rename UI view files from .js to .jsx","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T13:37:18Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:08Z","closed_at":"2026-09-02T14:24:01Z","external_ref":"https://github.com/samcharles93/archie-core/issues/685","dependencies":[{"issue_id":"archie-core-v9gv.1","depends_on_id":"archie-core-v9gv","type":"parent-child","created_at":"2026-09-02T13:37:18Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}