Commit Graph
8 Commits
Author SHA1 Message Date
sam 1c56ab6228 fix(webui): bind task requester to authenticated principal 2026-10-17 08:42:08 +11:00
sam 619e5104f0 fix(tasks): limit titles and display descriptions 2026-10-16 21:50:13 +11:00
sam a45300d626 refactor: testing from the beginning. a journey in 150k lines of tests to none 2026-10-03 21:16:25 +10:00
sam 5891d581cb fix(webui): the workflow handlers act in the caller's org
The definitions query was built by hand, so it carried no org and the server
resolved the default one, while the enablement document read beside it and the
enablement write went to the default org outright. A caller in a non-default
org therefore read one org's definitions beside another org's enablement, and
toggled that other org's workflows.

workflowCollection now builds its query with controlplanerpc.QueryRequest, and
the three enablement reads and the write use org.OrgFromContext, so every one of
them names the org the principal put on the request context.
2026-09-30 07:33:16 +10:00
sam c620b61278 feat(webui): name a workflow's declared inputs on the work-request form
The dashboard could not name a workflow's declared inputs, so POST
/api/work-requests admitted a pr-review task with no pr_number, which then
failed at the workflow's intake stage (archie-core-06nq). The handler now takes
`inputs`, checks it against the workflow's declared interface before admitting
the task, and carries it through SpawnRequest.Inputs -> EnqueueChatTaskRequest;
the form renders one field per declared input, sends a declared number as a
number, and keeps Start disabled while a required input is empty.

Item 2 of the lane brief -- archie-core-afbk.12, review.precision_gate /
review.approve_before_post in the dashboard Config tab -- is deliberately NOT in
this commit. The surface it describes no longer exists in this tree; the
supervisor's decision was to stop it and re-scope it as its own lane, and the
facts it must start from belong in the branch's record:

* The Config-tab components were deleted by 5f08625d (2026-09-25, "the legacy
  config catalog stops advertising fields the control plane owns"): ConfigSections.vue,
  ConfigRow.vue, ConfigControl.vue, ConfigList.vue, ConfigNotices.vue,
  ConfigUnavailable.vue, config-field.ts and sections.ts all went, because no
  page used them. Descriptor entries in internal/webui/config_schema.go would
  therefore change nothing a person can see: the only consumer of GET /api/config
  is SystemModelsPage reading `catalog`; the per-field `schema` has no renderer.
* The config write seams went earlier, in 2311529d (2026-09-21, "delete the
  runtime config overlay"): UpdateConfig, ResetConfig and UpdateRepoField are
  gone and internal/webui/server.go serves only GET /api/config. Configuration
  is written through the control plane.
* No control-plane resource carries review settings. executionSettingsDocument
  (internal/app/controlplane/workflow_settings.go) and workflow.ExecutionSettings
  carry only the four budget fields, and runtimeConfigFrom never layers
  cfg.Review. That is exactly why the budget descriptors survive in the catalog
  and review.* cannot: budgets are saved through workflow-execution-settings,
  edited on the Task-execution page, so those entries match a real write path.
* The brief's precedent name is wrong: TestToolSettingsProjectionCarriesEveryMCPServerField
  does not exist. The precedent is TestToolSettingsProjectionCarriesEveryMirroredField
  (internal/app/controlplane/runtime_config_test.go:349).

Making review.* genuinely editable needs a carrying control-plane resource
(extend workflow-execution-settings or add a review-settings kind), a layering
step in internal/app/archied/control_plane.go, and the round-trip test that
precedent sets -- an unsettled design decision spanning packages this lane does
not own.
2026-09-30 04:00:31 +10:00
sam 5c91575166 feat(pr-review): operator/chat trigger queues a pr-review task
review_pr self-omitted since 7299b923 deleted the synchronous reviewer it
called. It is rebuilt on the task enqueue path everything else uses: the
tool resolves the identity's configured repo, then queues a pr-review task
naming the pull request through the workflow's declared pr_number input,
which is the same generic input mechanism a watched-repos binding uses.

That input has to reach the store with the task, so
EnqueueChatTaskRequest gains inputs_json and the tasks insert writes the
inputs column directly. StampTaskBinding no longer writes it: the insert is
now the column's only writer, and a chat task must not acquire binding
provenance just to carry an input.

ChatPRReviewer, its result shape and the reviewer wiring are deleted with
the path they served.
2026-09-28 18:24:36 +10:00
sam 3944f544e8 feat(controlplane): runtime administration over the State Store's gRPC server
The Web UI and messaging channels now read and write Archie's runtime
settings through one versioned, audited control-plane API hosted on the
State Store's existing gRPC server: catalog, query, command, watch. Each
feature owns its resource, validation and commands; storage only writes
versions and audit records.

Workflows move with it. Definitions become portable YAML compiled through
a closed, typed step registry and stored as a control-plane resource, so
the yaegi interpretation paths (internal/gate, wfeval, wfextract,
gateeval, gateextract, skillbuild) are deleted rather than carried.

The UI process reads definitions as data: the JSON projection lives in
internal/domain/workflow/task so a dashboard decodes the stored
collection without linking the workflow engine, which cmd/archie-ui's
deletion gate forbids. Shipped definitions ride the catalog descriptor
rather than a bespoke REST route, keeping the API to its four operations.

archie-messaging gains -state-store-target/-state-store-token and reads
channel settings from the database, failing closed when the State Store
is unreachable: the database is authoritative for those settings.
2026-09-21 08:17:42 +10:00
sam a27d430215 feat(logging,workflow): daemon log feed and executable workflow registry
Add internal/logging.Feed, a logging-owned bounded replay buffer separate
from the persisted task-lifecycle event stream, with a live SSE endpoint.
Expose the executable workflow registry (skillbuild.Catalog) including
zero-run definitions and their origin (builtin vs. installed skill), not
just historical run statistics. Route() now returns an explicit failure
workflow for an unknown pre-assigned workflow name instead of silently
falling through to label-based routing.

Fixes #54
2026-08-09 01:26:10 +10:00