chore(beads): close archie-core-t2db.16

This commit is contained in:
sam committed 2026-09-03 06:42:40 +10:00
1 parent 5aaa6fd432
commit d5edd5c1bd
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -201,3 +201,4 @@
{"id":"int-5dd30e1f77dff564088caa908bd53330","kind":"field_change","created_at":"2026-09-02T20:18:20.908890222Z","actor":"Sam Catlow","issue_id":"archie-core-t2db.8","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Backend Owner/Repo fix (ac42f64) + full dashboard UI (85761c4, mirroring ui/src/mappings/) both landed. Full state machine (draft->edit->pending_approval->approve->armed->delete) verified end-to-end in a real browser. Also fixed a related bug found in the process (empty-secret-on-edit rejected, commit 51ca509)."}}
{"id":"int-5f9484b3ee198a74559bebb85c7227da","kind":"field_change","created_at":"2026-09-02T20:20:15.450996359Z","actor":"Sam Catlow","issue_id":"archie-core-t2db.6","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"All four items done: binding model + threat model (bindings.md, 41dffe3), ARCHITECTURE.md task-lifecycle addendum (edb90e1), operator walkthrough (this commit). Unblocked once t2db.8's UI landed."}}
{"id":"int-833f71f832182c4e497cb3695d7b0943","kind":"field_change","created_at":"2026-09-02T20:25:30.487991213Z","actor":"Sam Catlow","issue_id":"archie-core-mlro","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Extracted to ui/src/base/pill.jsx, all 12 call sites updated (11 pre-existing + bindings). Verified via task test:ui (120/120) and real browser re-check across all pages given this touches the same rendering path as the earlier Preact regression fix. Commit 2abccf3."}}
{"id":"int-1b49035689778e6ba250164f5761ca88","kind":"field_change","created_at":"2026-09-02T20:42:32.356058038Z","actor":"Sam Catlow","issue_id":"archie-core-t2db.16","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Both cyclop/gocognit findings resolved via pure extraction; golangci-lint run ./... reports 0 issues; go test ./... and task test:ui pass unchanged; task check green."}}
+1 -1
View File
@@ -97,7 +97,7 @@
{"_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.20","title":"eda: LSP/serve mode for cmd/archie-playbooks","description":"Second entrypoint of the gopls-shaped standalone binary from t2db.12 (lint mode already shipped). Sam explicitly kept this in scope, not deferred, because it's the same schema source as the linter, just a different consumer -- the design doc's shared-package, thin-consumer principle.\n\nGrounded by a crew investigation pass (2026-09-03): the loader decodes with yaml.Unmarshal into a plain map, which discards line numbers -- today's lint findings are file-granular only. A useful LSP (hover/completion/inline errors) needs real positions, so the yaml.Node decoding upgrade is a practical prerequisite, not a nice-to-have. internal/domain/eda/expr's Compile/Eval already return structured errors that should map cleanly to diagnostics -- confirm this rather than re-deriving error shapes.","design":"Two-part scope, decide whether to split into two tickets or do both together once you've read the code:\n1. yaml.Node decoding upgrade: replace the plain-map yaml.Unmarshal decode path (internal/domain/workflow/routing.go -- three call sites at time of writing, all doing 'var raw map[string]string; yaml.Unmarshal(data, \u0026raw)') with yaml.Node-based decoding that retains line/column info, without changing any existing collision-detection behavior.\n\nVERIFIED FEASIBLE, concrete shape (2026-09-03): gopkg.in/yaml.v3's Node type has Line/Column fields populated directly by the decoder (confirmed in the vendored source). For a mapping node (Kind == MappingNode), Content is a flat []*Node alternating key-node, value-node pairs -- so decoding into *yaml.Node instead of map[string]string gives Content[i].Line for the i-th key's line number directly, no manual line-counting needed. The upgrade is: yaml.Unmarshal(data, \u0026node) into a *yaml.Node instead of the map, then walk node.Content in pairs extracting key.Value/value.Value (same strings as today) plus key.Line (new). This is a pure additive capability -- existing collision error MESSAGES should stay byte-identical where line info isn't yet surfaced in them, add line numbers to the error format once available. Do not change collision-detection LOGIC, only the decode representation.\n\n2. serve/lsp command: add a new entry to cmd/archie-playbooks's existing command table (do not restructure -- t2db.12 built it explicitly to take this addition without restructuring, confirmed by reading cmd/archie-playbooks/main.go's commands map). Scope: a minimal LSP surface (diagnostics at minimum; hover/completion if straightforward) over the same compile/validate path the lint command already uses. Weigh a tiny hand-rolled LSP protocol implementation (fits organisation.md's thin cmd/ rule and the narrow-capability-family principle) against pulling in an LSP library -- vet any new dependency via the vetting-dependencies skill before adding it, same rigor as the CEL decision (docs/prds/eda-playbook-engine.md's resolved open question 1) -- this is a real, undecided choice, not preempted here.","acceptance_criteria":"cmd/archie-playbooks gains a serve (or lsp) subcommand alongside lint, using the same underlying compile/validate calls -- no second validation path. Diagnostics report file:line where the yaml.Node upgrade provides it. Existing lint-mode tests and behavior are unchanged (regression-tested). task check passes.","notes":"Full vetting record for sourcegraph/jsonrpc2, 2026-09-03 (same rigor as the approved cel.dev/cel-go decision):\n\n- Security: zero advisories on record (GitHub Advisory Database, queried directly). License: MIT (compatible).\n- Maintenance: genuinely active -- commits within the last month (Aug 2026), real CI hygiene work (not a dead repo with a stale README). Not archived (unlike sourcegraph/go-lsp, the other candidate, which IS archived and was ruled out).\n- Dependency footprint: measured directly (not assumed) -- importing only the jsonrpc2.Conn surface pulls in exactly ONE dependency, no gorilla/websocket at all (go.sum showed a single entry). websocket is a lazy/optional dependency of the library, only pulled in if its WS-transport-specific APIs are actually called -- a stdio-only LSP transport never touches it.\n- Binary size cost: measured directly, same baseline methodology as the CEL vetting -- a minimal Go binary baseline was 2,343,283 bytes; adding jsonrpc2 (importing Conn) measured 2,715,265 bytes. Cost: +371,982 bytes (~0.36MB). Far lighter than CEL's +13MB, as expected for a narrow JSON-RPC engine vs. a full expression-language runtime.\n\nVerdict: sourcegraph/jsonrpc2 clears vetting cleanly -- safe, cheap, active, correctness-sensitive-and-worth-depending-on (same reasoning as CEL: reimplementing JSON-RPC request/response ID correlation by hand is a real correctness surface, not free). This is a complete, ready-to-approve recommendation, not yet approved -- do not add the dependency or start implementation until Sam signs off, miLine truncated
{"_type":"issue","id":"archie-core-t2db.19","title":"eda: scope Channel and Forge action positions (investigation, blocked on execution-time gaps)","description":"Investigation ticket -- decide the typed-contract shape for the two remaining named action positions (Channel, Forge) before implementing either. Blocked on archie-core-t2db.17 (idempotency) since both are naturally side-effecting positions; investigation/scoping can proceed now, implementation cannot land before .17 resolves.\n\nGrounded by a crew investigation pass (2026-09-03): Channel already exists as internal/channels.Channel (embeds gateway.Gateway + ConfigSchema/ValidateConfig, telegram/email/webhook implementations registered at daemon startup). Forge already exists as internal/forge.Forge = IssueForge + PullRequestForge + RepoForge, with New(...) switching on github/gitea/none; the daemon poller currently special-cases forge operations directly rather than through any addressable position.","design":"See docs/prds/channel-forge-positions.md (committed 2026-09-03). Forge is fully scoped and ready to implement once t2db.17 lands: native-Go-by-name (not Module-kind) over the existing internal/forge.Forge interface, close-issue/link-branch as the safe first operations, create-pr deferred. Channel is NOT resolved -- the crew investigation's assumption that channels.Channel has an addressable send capability is FALSE (verified: only Name/Start/Stop + config validation exist, no Send method anywhere in internal/channels or internal/gateway). This is now an open product/architecture decision for Sam: whether 'Channel action' means (1) a new playbook-scoped notification capability distinct from the interactive chat channels, or (2) reusing the interactive channels with some new conversation-scoping mechanism for a non-chat trigger. Do not implement a Channel position until Sam decides which.","acceptance_criteria":"A design-doc addition (new docs/prds/ file or a section in eda-playbook-engine.md, your call which fits better -- state why) resolving: typed-contract shape for each position, Args/Result shapes, and the host-access/resolution mechanism. No implementation in this ticket.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T18:12:40Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:15:31Z","dependencies":[{"issue_id":"archie-core-t2db.19","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T18:12:40Z","created_by":"Sam Catlow","metadata":"{}"},{"issue_id":"archie-core-t2db.19","depends_on_id":"archie-core-t2db.17","type":"blocks","created_at":"2026-09-02T18:12:40Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":1,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-t2db.16","title":"eda: reduce complexity in bootstrap.go loadWorkflows and routing.go LoadPlaybookDirs","description":"task check now runs golangci-lint (Sam's explicit requirement, 2026-09-03 -- catch lint regressions as part of the definitive gate, not just fmt/vet/build/test). First run surfaced two real findings, both accumulated debt from this session's own EDA slices, not pre-existing:\n\n1. internal/app/archied/bootstrap.go:647 loadWorkflows -- cyclomatic complexity 17, max 15 (cyclop). Grew incrementally across t2db.9 (kindWorkflows), t2db.10 (labelWorkflows), t2db.11 (PlaybookDirs merge), t2db.15 (EDAPlaybookDir) -- each addition was small, the function as a whole crossed the threshold.\n2. internal/domain/workflow/routing.go:103 LoadPlaybookDirs -- cognitive complexity 52, max 30 (gocognit), from t2db.11's directory-merge loader (kind-vs-label detection, per-file and cross-file collision checks all inline).\n\nRoot-cause fix required, not suppression: no //nolint. Extract cohesive sub-steps into named helper functions -- this is exactly the kind of case AGENTS.md's Architectural Simplicity rule describes (prefer a clean extraction over papering past a threshold).","design":"For loadWorkflows: extract the four independent load-and-set steps (kind-file load, label-file load, playbook-dirs load+merge, EDAPlaybookDir load) into named helpers the top-level function calls in sequence, each returning its own error for the existing log-and-abort pattern. Do not change the log-and-abort error-handling shape or field names.\n\nFor LoadPlaybookDirs: split the per-file parsing loop's kind-detection-vs-label-detection-vs-collision-check logic into a couple of named helpers (e.g. classifyBinding, checkCollision) called from the main loop, keeping the existing collision error messages and behavior byte-identical -- this is a pure refactor, not a behavior change.","acceptance_criteria":"golangci-lint run ./... reports zero cyclop/gocognit findings on these two functions. All existing tests for workflow.LoadPlaybookDirs, kindWorkflows, labelWorkflows, and bootstrap's loadWorkflows-adjacent behavior pass unchanged (byte-identical collision error messages -- diff the exact strings, do not just check err != nil). task check (now including lint) passes fully.","status":"open","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T18:10:21Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:10:21Z","dependencies":[{"issue_id":"archie-core-t2db.16","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T18:10:21Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-t2db.16","title":"eda: reduce complexity in bootstrap.go loadWorkflows and routing.go LoadPlaybookDirs","description":"task check now runs golangci-lint (Sam's explicit requirement, 2026-09-03 -- catch lint regressions as part of the definitive gate, not just fmt/vet/build/test). First run surfaced two real findings, both accumulated debt from this session's own EDA slices, not pre-existing:\n\n1. internal/app/archied/bootstrap.go:647 loadWorkflows -- cyclomatic complexity 17, max 15 (cyclop). Grew incrementally across t2db.9 (kindWorkflows), t2db.10 (labelWorkflows), t2db.11 (PlaybookDirs merge), t2db.15 (EDAPlaybookDir) -- each addition was small, the function as a whole crossed the threshold.\n2. internal/domain/workflow/routing.go:103 LoadPlaybookDirs -- cognitive complexity 52, max 30 (gocognit), from t2db.11's directory-merge loader (kind-vs-label detection, per-file and cross-file collision checks all inline).\n\nRoot-cause fix required, not suppression: no //nolint. Extract cohesive sub-steps into named helper functions -- this is exactly the kind of case AGENTS.md's Architectural Simplicity rule describes (prefer a clean extraction over papering past a threshold).","design":"For loadWorkflows: extract the four independent load-and-set steps (kind-file load, label-file load, playbook-dirs load+merge, EDAPlaybookDir load) into named helpers the top-level function calls in sequence, each returning its own error for the existing log-and-abort pattern. Do not change the log-and-abort error-handling shape or field names.\n\nFor LoadPlaybookDirs: split the per-file parsing loop's kind-detection-vs-label-detection-vs-collision-check logic into a couple of named helpers (e.g. classifyBinding, checkCollision) called from the main loop, keeping the existing collision error messages and behavior byte-identical -- this is a pure refactor, not a behavior change.","acceptance_criteria":"golangci-lint run ./... reports zero cyclop/gocognit findings on these two functions. All existing tests for workflow.LoadPlaybookDirs, kindWorkflows, labelWorkflows, and bootstrap's loadWorkflows-adjacent behavior pass unchanged (byte-identical collision error messages -- diff the exact strings, do not just check err != nil). task check (now including lint) passes fully.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T18:10:21Z","created_by":"Sam Catlow","updated_at":"2026-09-02T20:42:32Z","closed_at":"2026-09-02T20:42:32Z","close_reason":"Both cyclop/gocognit findings resolved via pure extraction; golangci-lint run ./... reports 0 issues; go test ./... and task test:ui pass unchanged; task check green.","dependencies":[{"issue_id":"archie-core-t2db.16","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T18:10:21Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}
{"_type":"issue","id":"archie-core-t2db.15","title":"eda: playbook document + event coordinator, single-action workflow-kind dispatch","description":"Seventh slice of docs/prds/eda-playbook-engine.md. Builds the rich playbook document shape (trigger + ordered actions with CEL 'when') and an event coordinator that dispatches it -- the first real consumer of t2db.14's expr package. Scoped tightly to what's already safe per this doc's own gating:\n\n- Exactly ONE action per playbook in this slice, and it MUST be position: workflow. Reject (load failure) a playbook declaring more than one action, or an action whose position is module/channel/forge -- those remain blocked on the unresolved execution-time gaps (mid-run failure semantics, idempotency for non-workflow actions) per the 'Execution-time gaps' section. Do not relax this without Sam's sign-off -- this is the one hard boundary in this ticket, everything else is normal implementation judgment.\n- This is an ADDITIONAL loading path alongside the existing flat kind/label binding files (t2db.9/.10/.11). Do NOT modify workflow.Route(), workflow.workflowForLabels, or remove/change the existing single-file/multi-dir binding loaders. Migrating Route() onto the new mechanism is a separate, later, larger decision -- not in scope here.\n- Idempotency is free for this slice for the same reason it was free for t2db.13's first Module slice: a single workflow-kind action reaches the exact same workflow.Registry dispatch path that already carries TaskEnvelope's idempotency key. Nothing new to design here.","design":"Depends on archie-core-t2db.14 (expr package) -- do not start until it is closed and verified.\n\n1. Playbook document type (new package, likely internal/domain/eda/playbook -- confirm against organisation.md's layout rule, follow the log/logextract split precedent from t2db.13 if a generated component turns out to be needed, though this ticket is pure YAML+CEL, no Yaegi, so likely no extract package is needed here):\n - trigger: reuse existing workintake label/kind matching (do not invent a second label-matching mechanism -- workintake.SplitLabels/KindsForLabels already exist and are the one place this vocabulary lives).\n - actions: a list, validated at load to contain exactly one entry with position: workflow and a workflow registry name.\n - when: optional CEL expression string on the action, compiled via t2db.14's Compile() at load time -- a compile failure is a reported load failure (same collision-handling philosophy as t2db.9-.12), not a silently-skipped playbook.\n2. Event coordinator: loads playbook files from a configured directory (mirror the PlaybookDirs pattern from t2db.11 -- reuse its directory-scanning shape, do not reinvent), compiles every playbook's when expression at load (fail the whole load on any compile error, consistent with the existing reject-at-load rule), and at dispatch time: match trigger against an incoming task's labels/kind, evaluate when (if present) against a context of {event: \u003ctask's label/kind fields, whatever is cheaply available -- do not over-engineer the event shape beyond what a workflow-kind dispatch actually needs\u003e, actions: {} (empty -- no prior actions exist in a single-action playbook)}, and if the condition is true (or absent), dispatch to the named workflow via the existing workflow.Registry -- call the same registry lookup Route() already uses, do not duplicate dispatch logic.\n3. Config: a directory field for these playbook documents (distinct from t2db.11's PlaybookDirs, which holds flat binding files -- naming these two similar-but-different directories clearly is important; suggest something like EDAPlaybookDir or clarify in the field doc comment exactly how it differs from PlaybookDirs so a future reader isn't confused). If you judge the distinction is confusing enough that these should share one directory with two file shapes distinguished by content, flag that as a note in the PRD rather than silently deciding it -- but implement SOMETHING reasonable rather than blocking.\n4. Bootstrap wiring: load-and-abort on failure, matching every other slice's established pattern.\n5. Do NOT wire this into production task intake (daemon.go/pollNATS/publishTask) in this ticket -- prove the coordinator end-to-end with tests that construct a task-like input directly, the same way t2db.13 proved ModuleRegistry with direct Register/Invoke calls rather than full daemon wiring. Production wiring (making a real forge-triggered task actually flow through this coordinator instead of only workflow.Route()) is explicitly a follow-up ticket -- note it as such when you close this one.","acceptance_criteria":"A playbook YAML with trigger + one workflow-kind action + optional when loads successfully and dispatches to the correct registered workflow when trigger+when match. A playbook declaring 2+ actions is a reported load failure. A playbook with a non-workflow action position is a reported load failure. A whLine truncated
{"_type":"issue","id":"archie-core-t2db.14","title":"eda: CEL expression environment (compile/validate at load, evaluate at dispatch)","description":"Sixth slice of docs/prds/eda-playbook-engine.md, implementing the 'Implementation placement' section of the resolved open question 1 (CEL). Builds internal/domain/eda/expr in isolation, no coordinator/dispatch yet -- mirrors how t2db.13 built ModuleRegistry as a standalone, fully-tested unit before anything consumed it.\n\nThis is pure infrastructure for the dispatch slice (t2db.15) that depends on it. No production wiring in this ticket.","design":"Package internal/domain/eda/expr (domain layer: no infrastructure imports).\n\nPer the resolved doc section, build:\n1. Environment construction: a CEL env declaring the two context roots -- 'event' as map(string, dyn), 'actions' as map(string, dyn). Cost limit (J5): pick a constant (start at 100,000, name it clearly as a tunable, e.g. DefaultCostLimit) -- exact value is a judgment call already flagged as tunable, don't block on picking the 'right' number.\n2. Compile/validate at load: a function taking a CEL expression string and returning (compiled program, error) -- a syntax error, a reference to an unknown root (anything other than event/actions), or exceeding the cost limit is a returned error, never a panic. This is what both the playbook loader (t2db.15) and the lint tool (t2db.12, follow-up integration is a SEPARATE ticket, do not touch cmd/archie-playbooks in this one) will eventually call.\n3. Evaluate at dispatch: a function taking a compiled program and a context (event map[string]any, actions map[string]map[string]any) and returning (value, error) -- CEL evaluation errors (missing field, wrong type against a dyn value) are returned as errors, never panics. Use CEL's own panic-free evaluation; do not add a recover() wrapper unless a test proves CEL itself can panic (verify this, don't assume).\n4. actions.\u003cid\u003e.result field-level typing (J1/context-conformance in the doc): NOT required in this ticket -- that needs the generated Module Result structs wired in as CEL type declarations, which only matters once a playbook can reference a prior action's result (t2db.15 is single-action, so there IS no prior action). Keep actions declared as dyn for now; note in a comment that per-kind typed declarations are follow-up work once multi-action playbooks exist.\n5. Dependency: add cel.dev/cel-go v0.32.0 (pinned) to go.mod -- this is the only new dependency, already vetted (see the resolved doc section's vetting record). Do not re-vet it.\n\nFollow docs/prds/eda-playbook-engine.md's reject-at-load philosophy throughout: anything not accepted by the schema is a reported error, never a silent default.","acceptance_criteria":"internal/domain/eda/expr exists with: environment construction, Compile(expr string) (returned type, error), Eval(program, ctx) (value, error). Table-driven tests cover: a valid boolean expression against event fields evaluates correctly; a syntax error is a Compile-time error; a reference to an unknown root (e.g. 'foo.bar') is a Compile-time error; evaluating against a missing event field does not panic (returns an error or CEL's documented behavior, whichever is correct -- verify against real CEL semantics, don't guess); an expression that would exceed the cost limit is rejected, not silently truncated. go.mod gains cel.dev/cel-go v0.32.0 only. task check passes.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T17:57:19Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:01:29Z","closed_at":"2026-09-02T18:01:29Z","close_reason":"Implemented and gate-verified as 33cdece (pushed to main). internal/domain/eda/expr: NewEnv (event+actions roots, DefaultCostLimit 100k), Compile (reject-at-load: syntax/unknown-root/type errors returned), Eval (panic-free, errors returned, ref.Val unwrapped to native). cel.dev/cel-go v0.32.0 direct dep, vetted per resolved doc (no re-vet). 9 tests pass, all verified against real CEL semantics (cost limits accrue on macros; == on missing key is false; unknown root rejected at compile). task check clean (113/113 UI).","dependencies":[{"issue_id":"archie-core-t2db.14","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T17:57:19Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":1,"comment_count":0}
{"_type":"issue","id":"archie-core-t2db.13","title":"workflow: Module position first slice (registry + side-effect-free 'log' kind)","description":"Fifth slice of docs/prds/eda-playbook-engine.md, implementing docs/prds/module-position.md's recommended first slice: prove schema -\u003e go:generate -\u003e Yaegi load -\u003e ModuleRegistry -\u003e playbook dispatch end to end with a side-effect-free action kind, before any kind with a real external effect (notify, image-gen, forge writes) is attempted -- those remain blocked on the parent doc's unresolved execution-time gaps (idempotency, mid-run failure), which this slice deliberately does not need.\n\nGeneralizes the fixed-signature, resolved-by-name Yaegi pattern already shipped for custom gates (internal/gate/gateeval) and workflow stage plugins (skillbuild) -- do not invent a new interpreter-construction or panic-recovery mechanism; reuse yaegiutil.New/Resolve/Safe directly.","design":"Per module-position.md:\n1. internal/domain/eda/module/log: hand-written schema source (Args/Result structs, SchemaVersion const), //go:generate yaegi extract -name logextract producing logextract.Symbols -- same shape as gateextract/wfextract.\n2. internal/domain/eda/module: ModuleRegistry with Register(kind, dir) and Invoke(ctx, kind, rawArgs map[string]any) (map[string]any, error). No generic Module interface with an any payload -- Invoke decodes rawArgs into the kind's generated Args struct before calling the resolved function; a shape mismatch is a reported failure per the existing 'schema defines the accepted message' rule, not a silent zero-value fill. Discovery/resolve mirrors gateeval.Evaluate's structure (read file -\u003e yaegiutil.New with that kind's symbols -\u003e yaegiutil.Resolve[func(Args) Result] -\u003e yaegiutil.Safe-wrapped call).\n3. Config: ModuleDir field mirroring PluginDir's shape and doc comment exactly (operator-trusted directory of Yaegi module implementations, empty means none loaded).\n4. Wire ModuleRegistry construction into daemon startup (bootstrap.go) alongside the existing PlaybookDirs/routing-file loading -- log-and-abort on load failure, matching the established pattern.\n5. Do NOT implement notify, image-gen, or any action kind with a real external side effect in this slice. Do NOT wire this into playbook YAML action dispatch yet if that requires resolving the data-flow/condition syntax (parent doc open question 1) -- confirm during implementation whether a minimal 'run this one module action, no chaining' dispatch is small enough to include, or whether registry+one-kind-loadable is itself the right slice boundary and dispatch is a follow-up ticket.","acceptance_criteria":"internal/domain/eda/module/log exists with a generated symbol table via go:generate yaegi extract (same tooling as wfextract/gateextract, verified by running go generate ./... and checking the output compiles). ModuleRegistry.Register discovers and loads a *.go file implementing the log kind's generated contract; Invoke calls it and returns a typed result decoded from the interpreted function's return value. A malformed or wrong-shaped args map is a reported error, not a panic or silent default. Config gains ModuleDir (empty by default, no behavior change). Trust boundary matches PluginDir/SecretEngineDir (operator-installed, in-process, daemon-privileged) -- not repository/task code. task check passes.","status":"closed","priority":2,"issue_type":"task","owner":"sam@catlow.tech","created_at":"2026-09-02T17:11:21Z","created_by":"Sam Catlow","updated_at":"2026-09-02T17:35:28Z","closed_at":"2026-09-02T17:35:28Z","close_reason":"Implemented and gate-verified as d29c732 (pushed to main). ModuleRegistry (Register/Invoke, strict arg decode, yaegiutil panic recovery) + internal/domain/eda/module/log schema with generated logextract symbols; ModuleDir config wired in bootstrap.go with log-and-abort; examples/modules/log.go operator example proven through the real registry. Playbook YAML action dispatch deliberately deferred (data-flow Q1 unresolved) and recorded in module-position.md. task check clean (113/113 UI, exit 0).","dependencies":[{"issue_id":"archie-core-t2db.13","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T17:11:21Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0}