From c19cc0afe9a6ab7f6bbb4328218d827f9762a9dc Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Thu, 3 Sep 2026 04:39:00 +1000 Subject: [PATCH] chore(beads): record t2db.8 backend Owner/Repo resolution --- .beads/issues.jsonl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 2fbec67e9..496fac836 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -108,7 +108,7 @@ {"_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} {"_type":"issue","id":"archie-core-v9gv","title":"Migrate Web UI to Preact","status":"closed","priority":2,"issue_type":"epic","owner":"sam@catlow.tech","created_at":"2026-09-02T13:37:08Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:09Z","closed_at":"2026-09-02T14:24:11Z","close_reason":"All children completed","external_ref":"https://github.com/samcharles93/archie-core/issues/686","dependency_count":0,"dependent_count":0,"comment_count":0} -{"_type":"issue","id":"archie-core-t2db.8","title":"Dashboard UI for playbook bindings","description":"The t2db.4 backend shipped the CRUD API (POST/GET/PATCH/DELETE /api/bindings + POST /api/bindings/{id}/approve) plus the state machine and HMAC wiring. Operators cannot author bindings from the dashboard yet: a list-and-approve page exists in api_binding.go's response shape but the matching ui/src/ feature folder does not. Build the click-through editor mirroring ui/src/mappings/ -- CORRECTED 2026-09-03 (crew investigation): the actual convention there is .jsx, not .js (mapping-editor.jsx, mappings.jsx, mappings.css) -- follow that file extension, not payload-field-mapping.md:145-152's literal naming if it says .js. Components: source matcher, mapping picker, workflow picker, secret input, state-machine controls (create -\u003e edit -\u003e approve -\u003e armed). Also add binding.Owner / binding.Repo fields so multi-repo deployments have a UI to pin a binding to one repo (today the dispatch loop falls back to the single configured repo with a warning; multi-repo is broken -- confirmed still true, resolveBindingRepo in internal/daemon/daemon.go:654 refuses to dispatch with a warning when 0 or 2+ repos are configured). See docs/prds/webhook-intake-security.md and docs/prds/payload-field-mapping.md.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-09-02T13:24:13Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:12:59Z","external_ref":"https://github.com/samcharles93/archie-core/issues/687","dependencies":[{"issue_id":"archie-core-t2db.8","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T13:24:13Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} +{"_type":"issue","id":"archie-core-t2db.8","title":"Dashboard UI for playbook bindings","description":"The t2db.4 backend shipped the CRUD API (POST/GET/PATCH/DELETE /api/bindings + POST /api/bindings/{id}/approve) plus the state machine and HMAC wiring. Operators cannot author bindings from the dashboard yet: a list-and-approve page exists in api_binding.go's response shape but the matching ui/src/ feature folder does not. Build the click-through editor mirroring ui/src/mappings/ -- the actual convention there is .jsx, not .js (mapping-editor.jsx, mappings.jsx, mappings.css) -- follow that file extension, not payload-field-mapping.md:145-152's literal naming if it says .js. Components: source matcher, mapping picker, workflow picker, secret input, owner/repo pin input, state-machine controls (create -\u003e edit -\u003e approve -\u003e armed). See docs/prds/webhook-intake-security.md and docs/prds/payload-field-mapping.md.\n\nRESOLVED 2026-09-03 (commit ac42f64): the backend multi-repo correctness gap is fixed. binding.Binding now has optional Owner/Repo fields (Validate rejects setting only one); resolveBindingRepo (internal/daemon/daemon.go) dispatches to a pinned binding's own owner/repo unconditionally, falling back to the existing single-configured-repo behavior when unpinned. Wired through the API request/response shape already. Remaining scope for this ticket is UI-only: the dashboard editor itself, including an owner/repo input field for the pin added above.","acceptance_criteria":"The click-through editor exists in ui/src/bindings/ (or the confirmed correct convention), covering create -\u003e edit -\u003e approve -\u003e armed, including an owner/repo pin input. Backend correctness (multi-repo dispatch) is already resolved -- not part of this ticket's remaining acceptance.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-09-02T13:24:13Z","created_by":"Sam Catlow","updated_at":"2026-09-02T18:39:00Z","external_ref":"https://github.com/samcharles93/archie-core/issues/687","dependencies":[{"issue_id":"archie-core-t2db.8","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T13:24:13Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-t2db.7","title":"Encrypt binding secrets at rest","description":"binding.Binding.Secret is currently stored as plaintext in the bindings.secret TEXT column. Anyone with read access to the SQLite file (the same access level as captured_events.body and tasks.body) sees HMAC secrets in plaintext. Add at-rest encryption for the secret column so a leaked database file does not leak sender-side shared secrets. See docs/prds/webhook-intake-security.md point 5. Decide the cipher (likely AES-GCM with a key derived from archied's secret registry or a deployment-level key file), the key-rotation story, and whether captured_events.body redaction is upgraded at the same time. Phase F work for t2db.","status":"closed","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-09-02T13:24:12Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:10Z","closed_at":"2026-09-02T13:55:47Z","close_reason":"Closed","external_ref":"https://github.com/samcharles93/archie-core/issues/688","dependencies":[{"issue_id":"archie-core-t2db.7","depends_on_id":"archie-core-t2db","type":"parent-child","created_at":"2026-09-02T13:24:12Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-b6ew.6","title":"Inline editing for per-repo config fields (allow_concurrent, max_retries, review_enabled)","description":"archie-core-b6ew.4 shipped visibility for AllowConcurrent, MaxRetries, and ReviewEnabled on the repositories card (read-only), which was the concrete discoverability gap Sam hit. Actual inline editing was scoped out of that issue because it hits a real backend limitation discovered while implementing it: the dashboard's PATCH /api/config path (installUpdateConfigHandler in internal/app/archied/bootstrap.go) applies dotted-key updates via overlay.Nest + configuration.ApplyOverlayValues, and overlay.Nest (internal/infrastructure/configuration/overlay/overlay.go:162) only builds nested maps by splitting on '.' -- it has no array-index handling, so a key like 'repos.0.allow_concurrent' cannot be expressed, and Repos is a []config.Repo slice, not a map, so ApplyOverlayValues's YAML-merge-onto-struct approach cannot target one element either.\n\nThis needs either: (a) a dedicated repo-update seam (e.g. a webui handler keyed by owner/name that reads-modifies-writes the Repos slice directly, bypassing the generic dotted-overlay path), or (b) extending overlay.Nest/ApplyOverlayValues to support array indices generically, which is broader-reaching (touches every list-shaped config field, not just Repos) and needs its own design decision about whether index-based overlay keys are stable across a file edit that reorders [[repos]] entries. Option (a) is almost certainly the smaller, safer change -- decide in a short design note before implementing, per this repo's settled-design-first rule, since option (b) has real footguns (index stability) that deserve a deliberate answer, not a guess.","status":"closed","priority":2,"issue_type":"feature","assignee":"Sam Catlow","owner":"sam@catlow.tech","created_at":"2026-09-02T12:22:53Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:11Z","started_at":"2026-09-02T12:26:59Z","closed_at":"2026-09-02T12:34:55Z","close_reason":"Traced the mechanism before implementing: overlay.Nest/ApplyOverlayValues has no array-index support, but Repos is addressed as a WHOLE dotted key ('repos', no dot) whose value is the full slice -- so no changes to overlay/configuration packages were needed at all. Added PATCH /api/config/repos/{owner}/{name} (webui.Server.UpdateRepoField seam + handleConfigRepoUpdate), wired in archied/bootstrap.go's installUpdateRepoFieldHandler: reads the daemon's own live, untrimmed Repos (not webui.RepoView, which omits Preflight/TestGlob and would silently drop them on a naive round-trip), mutates the one matched repo's one field via the pure applyRepoFieldUpdate helper, and republishes through the existing UpdateConfig(ctx, {\"repos\": repos}) path unchanged -- zero duplicated validate/persist/publish logic.\n\nFrontend: config-row.js's row() gained an opts.save override so a caller can redirect where an edit persists; the repositories table renders an autosaving checkbox (allow_concurrent, review_enabled) and a save-on-blur/Enter text input (max_retries) via api.configRepoUpdate, reverting/erroring inline on failure rather than reloading the whole page mid-edit.\n\nGo tests cover the pure applyRepoFieldUpdate function directly (matched-repo-only mutation, untouched-field preservation including Preflight, type coercion, unknown repo/field rejection) and the webui handler (seam delegation, editable-field allowlist enforced before the seam is called, 503/400 mapping). JS tests cover the structural render (checkbox/input initial state) -- the save round trip itself isn't exercisable through the test shim (addEventListener is a no-op there), consistent with existing config-row.test.js coverage.","external_ref":"https://github.com/samcharles93/archie-core/issues/689","dependencies":[{"issue_id":"archie-core-b6ew.6","depends_on_id":"archie-core-b6ew","type":"parent-child","created_at":"2026-09-02T12:22:53Z","created_by":"Sam Catlow","metadata":"{}"}],"dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"archie-core-c0y4","title":"TelegramConfig gains a bws-capable Token (SecretRef), not just TokenEnv","description":"internal/config/config.go's TelegramConfig only has TokenEnv (a plain OS env var name); it never resolves through secret.Registry the way Forge.Token and Provider.APIKey do (secret.SecretRef{engine,key}), per ARCHITECTURE.md:220-224's own note that TelegramConfig.TokenEnv is one of the older env-only fields kept for backwards compatibility. internal/app/archied/telegram_setup.go:75 does a bare os.Getenv(cfg.Chat.Telegram.TokenEnv), bypassing the secret registry entirely.\n\nThis means a bws-stored Telegram token cannot be referenced directly in config.toml the way [providers.openai].api_key or [forge.token] already can -- the operator has to bridge it into a real process env var by hand (bws secret get ... | export ARCHIE_TELEGRAM_TOKEN=...) instead of writing [chat.telegram.token] = { engine = \"bws\", key = \"...\" }.\n\nFix: add a Token secret.SecretRef field to TelegramConfig, mirroring Forge.Token's shape and resolution path. Keep TokenEnv working as a fallback/legacy path (same pattern documented for Provider.APIKeyEnv vs APIKey) rather than a breaking config change -- resolve Token first if set, fall back to TokenEnv. Update config.example.toml and docs/architecture identity/config docs to show the SecretRef form as the preferred one.","status":"open","priority":2,"issue_type":"feature","owner":"sam@catlow.tech","created_at":"2026-09-02T12:21:10Z","created_by":"Sam Catlow","updated_at":"2026-09-02T14:56:12Z","external_ref":"https://github.com/samcharles93/archie-core/issues/690","dependency_count":0,"dependent_count":0,"comment_count":0}