Drop the bot_user-derived root identity and the empty-identity sentinel. System
polls forge connections and owns instance-level work; a polled task stores the
polling identity, task_queued and work_request_submitted carry task id, actor
and principal, and an empty task identity is refused. Migration 0072 moves
empty tasks.identity, the identity-grants root key and the old root's
connection permits to System so a re-poll dedups.
Adds Issue.Author to the forge contract; the daemon drops issues from
authors without write access and fails the listing closed when the forge
cannot answer.
quality, deploy, release, canary and promote move to .woodpecker/. The
Gitea Actions files stay in place until the maintainer removes them, so
both paths are live for now.
deploy keeps its shape (plan -> gate -> images -> signed release) in one
workflow because Woodpecker shares nothing between workflows: the plan
env file, the built zip and the agent image digest pass through the
workspace. The gate drives the host daemon through the Go client with the
socket mounted, and the images are built with buildx so the digest the
release statement pins comes from --metadata-file.
Two behavioural changes: the userns preflight is gone (a docker-backend
step cannot create unprivileged user namespaces, and no test needs one),
and the zip is no longer published as a CI artifact (Woodpecker has none);
it ships through the OCI release, which is what install.sh reads.
The harness page's setup terminal targets the Kit agent profiles, so the
two pages were two halves of one flow split across routes: with no Kit
profile the harness page dead-ended in a disabled 'No profiles
configured' select while the place to create one sat on another page.
/settings/agent-profiles now carries the profiles editor and a 'Harness
sign-in' section (setup terminal plus the credential-bindings sign-in
table), and /settings/harness redirects to it. The bindings re-read when
a terminal session ends so a fresh capture shows immediately, and a
null-seeded agent-profiles document now renders the empty state instead
of a bare add form. The gateway page registry names the merged page.
The in-container baseline task check failed at proto:check because buf
generate could not find either plugin on PATH, parking every task at
gate.repository.
loading-errors now forces each list API (/api/tasks, /api/captures,
/api/event-types, /api/tokens, /api/access/policies) to fail and asserts
the page shows its error surface, never its empty-state copy.
accessibility gains two static-route sweeps: every input/textarea/select/
button must have an accessible name, and every keyboard focus stop's
indicator (ring var, outline, shadow or focus border) must clear 3:1
against the background behind it. phone-overflow sweeps every static
route at 390x844 for horizontal scroll. The sweeps caught real gaps,
fixed here: the DurationInput amount input had no accessible name and
its unit select no focus indicator, and TabsContent and CodeBlockContent
were focusable with outline-none and no ring. The stale 'Sections' list
selector now matches the nav landmark.
answerAsk now clears the pending question only after api.chatAnswer
accepts it, and resolves whether it did. On failure the new askError ref
carries the message, shown on the card as a ReadError whose Retry resends
the last answer; ChatAskCard keeps the typed reply until acceptance and
routes every choice button through the same path, and the questionnaire
submits through the card so its answers are retryable too. askError resets
on turn start, on a new ask, and on conversation switch.
selectSession now bumps a session epoch and aborts the in-flight stream
before switching, and the transcript read is applied only if the session is
still current. sendMessage captures the epoch at turn start: a detached turn
stops reading, cancels the reader, and writes no messages, streamingTurn or
session id; only the turn still owning the abort controller clears isSending,
so it cannot unlock the composer for a turn running in the new conversation.
New policy now resets the draft instead of reusing the open policy's, so
Save cannot overwrite the policy that happens to be open. The id input is
readonly while editing a persisted policy, so a rename can no longer write
a second policy. New/Edit/Cancel route through openForm, which asks for
confirmation before discarding a dirty draft.
--terminal-bg/fg/cursor/selection are defined per theme in style.css
(dark keeps the deep well, light gets a paper inset) and exposed as
bg-terminal. Both xterm surfaces (SetupTerminal, SandboxView) read them
via lib/terminalTheme and re-apply on every data-theme flip, so the
theme switch is live; the raw #0b0f14/#e6edf3/#264f78 hex is gone.
text-success was not a token (now text-ok) in ChatToolCall and BindEvent;
var(--radius) is undefined (now var(--radius-lg)) in input-group and Sonner;
Sonner's hsl(var(--popover) / 0.9) wrapped a hex (now a plain hex); the
undefined cn-font-heading class is deleted from the nine title components.
Inactive tab labels use text-fg-muted instead of foreground/60 (was
4.1:1). The selected toggle/toggle-group segment gains a sage-deep ring
(5.3:1 light, 3.9:1 dark) instead of the near-invisible muted fill.
--input rises to 3.6:1 (light) and 3.5:1 (dark) on the card; dark --idle
rises to 5.1:1 on --accent. Values computed against the style.css tokens.
Skills, curators, QuickTask's workflow list, the alerts bell and the
extensions catalogue now show a loading state until the first read
settles, then the data, the error, or the empty state. Draft-backed lists
(agent profiles, playbooks, credential bindings) show their empty state
only once the draft exists, not beside the load error.
New settings/KindGate renders the store's per-kind loading/error state
where the form would be: a skeleton while loading, ReadError with Retry
on a failed read. Wired into Tools, SystemModels, SystemRepos,
SchedulingPolicy, ContainerRuntime, OrgAlerts, Instructions, Plugins,
SystemTasks, UpdateSettings, IdentityGrants, OrgModels, Channels and
Authentication pages, which no longer render blank until the draft
exists.
New components/ui ReadError (destructive Alert + message + optional Retry)
is now the single read-error presentation, used by Versions, Services,
Canary, OrgAccess, Denials, Tokens, Audit, Extensions, Harness and the
Status page (one page-level error instead of one per card). PanelError is
the same alert for task panels, and TasksState's error kind, the attempts
panel and the task-log pane all offer Retry. Org policy save errors sit
beside the Save button instead of at the page top.
A failed Load more or live refresh sets moreError beside the Load more
button instead of replacing the table; only a first-load failure takes
the table down. The no-match empty state says search covers loaded rows
when more pages exist. refreshAll keeps attempts/events (keep=true) and a
failed task-list read keeps the last known list, so panels no longer
flash to loading on every live update.
readError is cleared only by a successful read instead of at the start of
every 5 s refresh, so an outage shows a steady error beside the stale
lines. liveEntries is pruned past 1500 (the list shows 1000) so the map
cannot grow unbounded. streamState leaves "unavailable" as soon as live
entries flow again.
use-alerts.ts now holds the alerts/failed refs at module scope (wired once),
so the bell and the dashboard card see the same list. dismiss removes the
alert only after the server confirms; on failure it stays and the reason
shows in the bell. dismissAll reports any rejection and reloads.
Mic permission failure shows an inline alert; setModel only switches on
server confirmation and reverts + reports in the transcript on failure;
a failed session refresh after a turn no longer becomes a retryable turn
error; a voice clip during a turn queues instead of dropping; blocked
localStorage falls back to a per-load channel id; a failed install offers
Retry/Not now again; rename/branch use a labelled Dialog instead of
window.prompt; a failed cancel is reported; a stopped turn no longer
blocks transcript reloads.
Delete policy, remove member, revoke token, remove passkey and delete
source now open the shared AlertDialog confirmation that names the item,
matching the binding/mapping/event-type deletes that already confirmed.
DataTable, ActivityRow, LiveActivityCard's group row and CaptureRow no
longer put role=link/button, tabindex or aria-label on the <tr>. The row
keeps its mouse click handler; the first cell carries a real RouterLink
(DataTable rowLink) or button with the accessible name, so keyboard and
screen-reader users get a focus target and rows keep row/cell semantics.
The live-activity group row's disclosure button and open button are now
siblings, not nested.
CardTitle and EmptyTitle take an as prop (default h2) and render through
component :is, so card and empty-state titles are headings; Section passes
as="h2" under the page's h1. The sidebar menu list now sits in
<nav aria-label="Sections">.
Disabled New run and task-row buttons now carry their reason in a Tooltip
on a focusable wrapper (disabled buttons cannot take focus), and New run
says when the task list has not loaded. Truncated values (binding filter
and failure reason, activity rows, live alerts, event-type rule summaries,
source URLs, mapping field paths) are focusable spans whose full text is in
a Tooltip. The org switcher has distinct loading ('…' tile, 'Loading…')
and failed ('!' tile, 'Organisations unavailable') states.
The composer textarea is now role=combobox with aria-expanded,
aria-controls and aria-activedescendant wired to the slash palette's
listbox ids. CommandInput has an accessible name. FieldLabels without a
control beside them are bound: for/id on selects, inputs, switches and
duration inputs across channels, curators and schedules pages, and
role=group + aria-labelledby/aria-label on the TagsInput, secret-ref and
rule row groups.
Schedules, command palette, skills, repos, services, secret engines,
captures, event types, curators, sources, channels, mappings (list and
preview), dispatch links and workflow history now capture a generation
at request start and drop their writes unless still latest — the guard
logs/state.ts already used. A failed schedules poll keeps the last good
rows beside the inline error instead of replacing the table, and a
failed skills/secret-engines poll no longer clears the list.
A websocket that never opened stays "failed" — onclose no longer
overwrites it with "closed", so the terminal says "Could not open the
setup terminal." instead of "The terminal session ended.". The terminal
emits ended when its session closes, and HarnessPage resets terminalOpen
on it (plus a Close terminal button), so reopening starts a fresh session
instead of requiring a page reload. The harness load failure now has a
Retry button.
Install disables when no installable snapshot; retention hours is empty
until loaded instead of showing 0; the audit Action field carries all
comma-separated actions; saving a view over an existing name asks first;
"Password changed" is a notice, not a destructive alert; "Sign in
again" appears only on an expired session (classifyActionError) on
account, authentication and create-account; sign-out failure sets the
store error instead of an unhandled rejection; the workflow identity
select shows the seeded agent without writing it into the YAML;
unparseable durations show an inline error instead of snapping back;
CardAccordion keys items by id; curator add() explains a no-op.
Grants rows and toggle groups wrap with a smaller phone label; the token
form wraps and its input flexes; the sources name column caps at full
width and its action buttons wrap; the rule-editor condition row wraps
with a full-width phone select; the payload tree indents less and breaks
long JSON leaves; the topbar instance badge truncates; org agent rows
keep Assign inline and move Rename/Suspend/Retire into a MoreMenu. New
e2e check phone-overflow.cjs visits these views at 390x844 with seeded
data and asserts no horizontal scroll.
components/ui and the pages now use only the style.css scale:
text-[0.8rem]→text-label, text-[0.625rem]→text-micro, text-base/text-sm→
text-label (rows and controls), text-xs→text-caption (captions and
secondary text), text-lg/text-xl/text-2xl→text-title (panel and page
titles). Rendered markdown (ChatMarkdown/ChatInline/markdown.ts) keeps
Tailwind steps as the issue allows. 196 files, class-token swaps only.
Captions move from text-xs to the text-caption type-scale token across
the workflow/bind/schedule editors and curator card. The task page title
uses PageHeader's h1 classes. Hand-rolled boxes become Card (token
reveal, recovery code, pending extension update) or CodeView (install
progress); the startup-settings key/value table becomes MetadataList;
the harness empty row becomes TableEmpty; 'No tokens/dispatches/inputs/
removed' states become Empty; the step-editor problem line becomes a
destructive Alert. The risky-row danger tint in ToolsPage and
SystemReposPage now uses SettingRow tone="danger" instead of a
hand-written before: overlay (DANGER_ROW deleted).
Token lifetimes use Select instead of NativeSelect. Credential bindings
pick service from the store's credentialServices and organisation from
the org list (empty = default, via a sentinel). Curator and agent-profile
tools are TagsInput instead of comma text; curator model is a Select of
the configured providers' models from /api/config's catalog. Org and
system model pages pick provider class from the catalog's classes, and
SystemModelsPage's local CLASSES list is deleted. Chat model choice is a
Select of the server-served model list instead of a button row.
Left as free text because no server source exists: policy object kind,
curator memory engine, update channel labels, connection type default,
container default, step titles (x-step-types carries no titles).
lib/format.ts gains shortTime(value, zone) and becomes the home of the
single duration() formatter (moved from timeline-event.ts, which
re-exports it so the stage rail and duration.test.ts are unchanged).
LogTable's time column, audit's From/To chips and chat session titles now
format in the zone chosen under Appearance instead of the browser's.
StepNode, schedule runDuration, labels formatMs and ChatToolCall all
delegate to duration(), removing the "12ms" vs "12 ms" vs "under 1 s"
split.
persistDraft retried only while draftState.saving was true, but
settings.replace clears saving in its finally before resolving false, so
the retry branch could never run and a failed putDraft vanished. It now
retries on a bounded schedule (5 attempts, 500ms apart) regardless of the
saving flag, and on final failure sets localError so the editor's alert
says the draft was not saved while the edit stays in the editor. The
alert also reads the draft store's own error (workflows.draftState.error)
instead of only the definitions store's.
Triggers: a failed bindings/schedules read surfaces as an error with
Retry in TriggerSettings instead of "Manual runs only." Run stages: a
failed attempts read sets stagesError, shown with Retry above the canvas
instead of a bare canvas. Bind form: failed reads show an error with
Retry rather than empty pickers, and save refuses to mappingUpdate an
existing mapping unless the bindings list actually loaded. History: a
failed revisions read shows the error with Retry in the revision list,
and "No recorded changes" appears only after a successful read.
Chat: a failed conversation load sets sessionError, shown in the
transcript with Retry instead of the empty invitation (it no longer goes
to statusText in the settings popover). Command palette: failed task or
workflow reads render a "Couldn't load … — Retry" item in that group.
Denials: the table no longer shows "No denials recorded" under an
error. Mapping form: failed captures/event-types reads show an error row
with Retry instead of "No captured events yet." or a silently empty
select. Channels: a failed status read keeps the last badges and shows
an error with Retry. Sources: read failures are separate from write
failures, shown with Retry, and a loaded-but-empty list gets an empty
state.
TasksPage load/loadMore, use-task-run keyedLoad, TaskLogs loadOlder and
EventsPage loadCounts now each capture a generation at request start and
drop their writes unless they are still the latest request, the same
guard logs/state.ts already uses. dropCaches also stales every in-flight
keyed read, so a 30s timeout's null can no longer overwrite a newer
successful response, and the task-log pager no longer writes a page
fetched under the old attempt or filter.
The step header in StepNode.vue was a div with @click and no role, so a
step could not be opened from the keyboard, and Edit existed only in the
right-click canvas menu. The header now renders as a real <button> (with
aria-expanded) whenever the step can toggle, so Tab/Enter/Space open it;
while renaming it stays a div so the rename input is not nested inside a
button. The actions menu trigger moved to an absolute overlay at the
card's top-right (same spot as before, with a matching spacer in the
header row) and gained an Edit item that toggles the step, matching the
canvas context menu.
Step editor fields (lead, compact rows, long/YAML textareas and the
compact boolean switch), the org policy editor (policy id, level,
workspace id, object kind/id, Cedar textarea), the binding constant
value input, the log search and the channel tags inputs now each carry
an aria-label. On TagsInput the aria-label moved from the root div,
where screen readers never reach it, onto the actual TagsInputInput.
The shared components used focus-visible:ring-ring/50 (and the base
outline-ring/50), which measured 2.1:1 on light and 2.4:1 on dark --
under the 3:1 WCAG 2.4.11/1.4.11 requires. All ring-ring and outline-ring
tokens in ui/src now render at full strength (5.3:1 light, 5.7:1 dark),
matching the :focus-visible outline floor in style.css.
When /api/auth/status fails, App.vue now shows a centred card with the
logo, a plain 'Can't reach Archie' statement and the detail in a
destructive Alert (role=alert), and retries the read every 5s until it
succeeds instead of offering only a manual Retry link. errorMessage in
api.ts only reads text/plain bodies, so a proxy's HTML error page no
longer passes through as the detail; other content types fall back to
the status line.
The check job now runs on the archie-quality self-hosted runner under an
unprivileged user, so the sudo apt-get install and sudo sysctl steps fail,
exactly as the deploy gate did before 3b372b4a. Both are host provisioning:
ripgrep is installed on the runner host and the userns restriction belongs in
sysctl.d. The namespace check stays, without sudo.
Same pattern as the bindings pilot: eventTypesAPI (registers unconditionally,
list answers enabled:false without a store), mappingsAPI and sourcesAPI
(constructed only when their store is configured, 503 stub otherwise).
Shared helpers unsignedSources/recentRefusals/listedIn stay on Server; the
dispatch-ledger handler stays shared for captures/tasks. task check green.
Pilot for one-module-per-resource: bindingsAPI owns the /api/bindings*
routes and their handlers, constructed only when the binding store is
configured; a 503 stub mounts the same routes otherwise, preserving the
old not-configured answers. Handlers move off *Server unchanged in
behavior; the shared dispatch-ledger handler stays on Server for the
captures/tasks routes. task check green.
Complete the var _ storecontract.X = (*T)(nil) sweep so each of the 31
contract interfaces is compiler-checked against at least one adapter:
postgres.Store (19), postgres.EDA (11, consolidated into edastore.go),
staterpc.Client (29). Removes the scattered single-line assertions from
harness_secrets.go, edastore_eventtypes.go, sources.go, run_credentials.go.
task check green.
Curators could only reach the workflow/integration tools; there was no way
to survey task runs. Adds run_list/run_events to the shared registry
(guarded as read on task kind), attaches the instance's acting principal
to curator model calls so guarded tools authorize, and records a pass's
final text as a pass.summary action so the report is inspectable. Ships a
dry-run self-intake definition in dev.toml/config.example.toml declaring
only those two tools, so it cannot file issues yet.
Pure move: one 624-line storecontract.go becomes storecontract.go
(package doc + composed TaskStore), task.go, capture.go, binding.go,
mapping.go, source.go, status.go, resource.go, credentials.go and
errors.go. The package remains the single seam; no declaration changed
(verified line-identical against HEAD). task check green.
Issue-level writes could comment and close but not open an issue, so no
curator or workflow stage can file its own work yet. Adds the rpc to
proto/forge/v1, regenerates the contracts, and threads it through the
domain interface, forgerpc client/server (comment permission, like
CloseIssue), forgeext, and the archipelago SDK + gitea/github plugins.
Service accounts created through the identities API are assigned the
developer role in the request's org, whose shipped policy permits read and
write across the org -- the permit alone did not scope the canary. Install a
matching org-canary-grant-forbid policy (access.CanaryGrantForbidPolicy) that
negates exactly the permit's surface for the canary identity; a forbid wins
within the level, so the role can no longer widen access. Engine tests pin
the surface with the principal carrying the developer role, and the
rehearsal now proves it live: the scoped token gets 403 on /api/access/policies
and 200 on /api/chat/update, and the full canary loop runs on it.
task check passes; task canary:rehearse green (REHEARSE_EXIT=0).
The canary now authenticates as a dedicated service-account identity in the
system org whose only grant is access.CalaryGrantPolicy: read the signal
endpoints (chat update, alerts, logs, tasks), read and write the
update-settings resource, and trigger an update install. CANARY_TOKEN no
longer carries instance admin; DEPLOY_TOKEN stays CI-only.
- authorize: POST /api/chat/update/install and /defer map to
update on Object::"update" (dashboard) instead of run on any workflow,
so the grant can cover installs without granting workflow runs
- accounts: active service-account identities may authenticate with bearer
tokens (CanAct), not just users
- new POST /api/identities/{id}/tokens (behind manage_identities) mints a
token for a named non-user identity; new AccountService RPC
BindIdentityPersonalToken backs it remotely, refusing user-kind targets,
with the caller recorded as audit actor
- engine tests pin the grant's exact allow/deny surface
RELEASING.md documents the one-time setup. task check passes on this tree.
- one shared UpdateStateDir() resolver for daemon and dashboard, instead of
two copies that could drift
- the recovery path for a committed/rolled-back journal writes
installed.json too, so a crash after the outcome phase cannot lose the
install record
- JudgeCanaryNow is the explicit signals-only entry point for promoting
without the window, replacing the zero-install-time sentinel
- canary version comparisons use IssuedAt, matching Promote's replay rule,
so semver/issued-at divergence cannot wedge check red; queuedBehind
reuses the judgeable predicate instead of a looser check
- promote prints the channel/pin; promote.yml cancels superseded runs
- canary card: no duplicated elapsed rendering, channel row waits for the
settings resource instead of showing a default, agent fallback '?'
- rehearsal script bounds its docker build/push/run calls
task check passes on this tree.
The canary window now counts from when a release is installed on the host
(installed.json / installed_at in the update snapshot), not from the
statement's issued_at, and 'release canary check' judges the release the
canary actually runs via its exact-pin tag instead of the moving next tag.
A newer release on next queues behind the one being judged instead of
restarting the clock, so stable moves once per release.
New subcommands: canary status (read-only state, signals, verdict), canary
promote (promote now when hard checks pass), canary unpin (back to next),
and start -force. A held/pinned canary is verified installable every check
and a stranded pin fails the run red instead of looking green. Rollback
pre-flight checks stable's zip and agent image digests before pinning.
Relative signals are judged whenever both windows carry minimum data, so a
breach rolls back mid-window; promote still needs the full window unless
the operator promotes early (new promote.yml workflow_dispatch). The window
is configurable via -window / CANARY_WINDOW.
Also: dashboard canary status card (ui), and task canary:rehearse, a local
end-to-end rehearsal of publish -> canary start -> status -> check ->
promote against a throwaway registry and host.
task check passes; rehearsal run green (REHEARSE_EXIT=0).
Record the model's reasoning parts. The step run view shows reasoning as a
Thought row, shell calls as a terminal, the gate as a test run, web_fetch as a
source, finish as the verdict, and each fan-out branch as a subagent.
The loop runner hooks every model call and tool call and reports ordered,
redacted, clipped entries. Each is persisted as an agent_transcript task
event through InsertEvent, left out of the timeline read, and served per
attempt at /api/tasks/{id}/transcript. The step run view shows it with Trace.
With an existing database_url, setup prefilled the URL, so a blank answer
kept it and the bundled socket database was unreachable without typing its
URL. The re-run database step now presents a choice menu: keep the existing
URL (still the default), switch to the bundled database (socket URL plus a
generated PGPASSWORD written to the env file), or enter a different URL.
Fresh installs and -database-url are unchanged; a blank answer anywhere
still keeps the existing URL. Pinned at the setup API level with fake
prompter/sink: TestRunParamsDatabaseChoice.
The bundled internal/channels/telegram package (17 files) is deleted; the
channel now ships as archipelago/channels/telegram, launched by archiemessaging
through the existing channel-extension machinery. An existing [chat.telegram]
config enables it with the same keys: the token stays a secret reference
(token_ref) the host resolves, allowed_user_ids and show_tool_calls map onto
extension settings. Per-org bots compose the same extension per org from the
org's credential binding. Reload support is now derived from a channels.Reloader
interface instead of a *telegram.Gateway assertion. The five host-only seams
(/update, release announcements, running versions, in-place show_tool_calls,
reload) are dropped from the channel and need a contract home or deletion.
Add [access].denial_retention (default 90 days, matching the audit-retention
seed) wired through config defaults and validation; the State Store sweeps
denial records older than the configured age hourly via the new
access.DenialPruner / PruneDenials store query. The dashboard gains
GET /api/access/denials (read_audit-gated, so org admins/owners see their
org's records; the store scopes by the credential's org) and an
/org/denials page backed by a Pinia store.
The deploy gate's govulncheck step failed on the first run that reached it, for
two real findings: crypto/x509 in the standard library, fixed in go1.27.3, and
golang.org/x/net v0.61.0, reached from webfetch.htmlToText calling html.Parse,
fixed in v0.62.0. govulncheck now reports none.
deploy.yml inlined its own sequence, which drifted weaker than `task check`:
no db:check, news:check or ui:check, so a release could ship stale sqlc
output, a stale ui/dist, or release notes that disagree with CHANGELOG.md,
and the dashboard suite ran outside the gate without its type check.
The release now runs `task check TEST_FLAGS=-count=1`: same definition, the
full uncached suite including the Docker-backed tests -short skips. quality.yml
already invoked the Taskfile, so both pipelines now share one gate.
The pinning section said CI republished ghcr.io on every push to main. CI
publishes git.catlow.cloud, and only for a release tag; ghcr is where the
hand-run tools/publish.sh writes, which is the reference the default names.
A release zip pins a digest on a registry an anonymous pull cannot reach, and
[containers].registry_auth -- the setting that fixes it -- was documented
nowhere. Documented there, beside the pin.
Also corrected: every shipped profile does not pin the image, and the section
link omitted its number so it matched no heading.
setup-node's cache save fails on this runner -- the pnpm store path it computes
does not exist at post-step time, which marks the job failed after the gate has
already passed. Run 19 proved it: 0 lint issues, ui/dist matched, no task failure,
then 'Path Validation Error' and exit 1.
Manager.StepTypes and Providers had no reader; the catalogue they were meant
to feed is not missing -- Registry/Settings serve it as x-step-types in the
workflow-definitions schema, read by the dashboard workflow editor and the
gateway's workflow_step_types tool. Remove the write-only providers field
the accessor deletion left behind, and pin that production reader in
controlplanerpc so a dropped schema extension fails the gate.
A failed state-label change was dropped at three points: the forge.Forge
interface returned nothing, forgeext logged the extension's gRPC error
instead of returning it, and the forgerpc client and server discarded the
response error. SetStateLabel now returns an error on the interface and on
NoopForge, forgeext propagates the extension's error, and the forgerpc
server carries it in the response envelope while the client returns it,
matching the other forgerpc handlers.
The proto is unchanged: a gRPC error rides the status and
SetStateLabelResponse is already an empty message.
TestSetStateLabelFailureReachesTheCaller pins the full chain: an extension
whose SetStateLabel RPC fails, through forgeext and the forgerpc
client/server, to the caller receiving the error.
Refs #280
Registry.filter stripped the LLM capability whenever a manifest declared
no tools, skills, memory or conversation capabilities, but
DefinitionEngine.Pass always calls the model. An instruction-only custom
curator therefore registered healthy and then failed every pass with
'no model runner is bound'. The definition engine is inherently agentic,
so the filter now keeps the model runner for it while every other
capability service stays bound only when declared.
Adds tests reproducing the instruction-only pass through the
registry/engine path and pinning that the registrar view for an
instruction-only manifest exposes the model but no tools, skills,
memory or conversations.
Closes#1132
A failed RecordUsage was logged and dropped, losing chat, title, sampling
and curator usage that cannot be rebuilt from events. The staterpc Client
now keeps a bounded local outbox: a failed write is queued and retried with
backoff (1s doubling to 1m, 10s per attempt) until the store accepts it, so
records land once the store recovers. The queue is capped at 1024 records;
an overflow is refused so the caller logs the drop. The sampling usage
write is bounded to 5s so a dead store cannot hold a model call.
The deploy gate runs on a self-hosted runner under an unprivileged user, so the
sudo apt-get install and sudo sysctl steps fail. Both are host provisioning:
ripgrep is installed on the runner host and the userns restriction belongs in
sysctl.d. The namespace check stays, without sudo.
The check job asked for the self-hosted label. The repository's only runner,
archie-quality, is online but carries just its own custom label, so run 17 has
been queued since it was pushed. Name the runner instead of a label nothing
offers.
Every one of the 1709 tracker issues was created in Gitea and checked field by
field against its source record: title, body, state, label set, assignee,
comments, dependency edges and epic label. All 1729 beads are closed, citing the
issue that carries each one, and .beads is removed.
Three differences are deliberate: Gitea truncates titles at 253 characters, so
three long titles keep their full text in the issue body; Gitea refuses a mutual
dependency, so five symmetric relates-to links exist in one direction; issue 497
carries its fix from e3b1103f.
The GitHub forge extension accepted every pending repository
invitation, so any GitHub user could add archie's account to a
repository by sending an invitation. AcceptInvitations now carries the
connection's configured repositories and the extension leaves an
invitation to anything else pending.
Nine packages each had their own write-temp-then-rename helper with
slightly different behaviour (some synced, some did not; some created
the parent directory, some did not; modes and temp-file patterns
varied). They are replaced by one fsutil.WriteFileAtomic that always
syncs before rename, creates the parent directory, and takes the file
mode as a parameter.
A webhook URL with embedded credentials or a query string can leak
secrets through logs, proxies and referrer headers. The task policy
validator now refuses both.
The deploy workflow now targets git.catlow.cloud: images push to the
Gitea registry and the distribution zip publishes as a release on
sam/archie through the Gitea API, both authenticated with one
DEPLOY_TOKEN PAT (write:packages + write:repository scopes).
Inline error paragraphs become destructive Alerts, divided record lists
become Item rows, the redirect URI box uses CodeView, and icon-button
title hints use Tooltip. Native titles remain on truncated values and on
disabled controls.
Each control-plane kind has one store-owned TanStack form, so edits survive
navigation and the save bar submits every dirty section. Shared editors emit
new values, map entries are written whole, unset resources stay null, and the
container runtime page warns when max uptime is under the task limit.
workflow.approve pre-writes the task's workflow column with the workflow
that runs once approved, so task_list named a workflow that had not
started while the task's own log named the one that produced the plan.
Chat now names the compiled workflow through the pinned definition for a
plan wait, matching the log.
Clicking any navigation control counted as an outside click, so the dock
collapsed on every route change and the conversation disappeared. Hide and
Escape remain the only ways to collapse it.
The e2e accessibility check referenced the removed outside-click launcher and
the old Close chat label; both now use the dock's real controls.
The chat agent read only its local checkout, so an unfetched workspace made it report that no task branch or PR existed and that shipped UI code did not exist. Add a core rule: refresh from the remote or check the forge before describing branches, commits, pull requests or the default branch, and say the answer is local-only when it cannot.
A run that parked left tc.Outcome empty, so the taskrun response carried an
empty status and the daemon logged 'taskrun run recorded no outcome' for a run
that had recorded one, then retried the park it could not apply.
Record the outcome once the parked transition lands, so a budget stop and every
other park surface with the reason the run parked.
A chat profile bound to the operator identity passed a strict scope to the
action gate, so it refused root-owned tasks whose identity is the daemon's
empty sentinel (task 22: belongs to "", not "d898c8c8-..."). The dashboard
acts with a nil scope and the chat read paths already treat the operator as
acting across identities, so the write gate was the only surface that disagreed.
Exempt the operator identity from the scope comparison and share that rule with
the chat adapters that had their own copy.
StagePRReviewAndOpenPR set tc.prReview.ownPR before the decision stages ran,
but intake allocates tc.prReview, so every implement run dereferenced a nil
state at repo.open-pr and the agent container panicked with exit code 2
before opening the pull request.
Schedules list as a table with enable, run now, edit, duplicate, delete and
view runs; built-ins only enable, retime and run. The runs page links each
run's tasks through its capture's dispatches. The Start node gains a Schedule
trigger that picks or creates a schedule and binds the schedule source to the
workflow. Times show in a per-browser display zone set under Appearance; the
cron time zone and run retention are edited on the Schedules page.
Schedules leave the schedules control-plane resource for State Store tables
behind a ScheduleService contract. A run is claimed per schedule slot, missed
slots fire once, the next run stays on the schedule's grid, cron is read in the
schedule-settings time zone, and failed runs are recorded and advance. Three
failures in a row raise a schedule.failing alert. A fired run records a
schedule-fired capture. Run history is pruned by age and count.
Removes the chat and spawn-task runners, the dangerous-payload guard and the
old schedules settings page.
Cycle's maintenance passes become a BuiltinJobs list for the scheduler to
seed as locked schedules. Mirrors use a file lock shared by every Manager
and held across refresh and clone, so pruning cannot race a clone.
A trailing-slash pattern in .dockerignore matches only the context root, so
node_modules/ never excluded ui/node_modules -- 200MB shipped to the builder
for a Go compile. The issue tracker's Dolt directory was never listed at all.
Every line here either bloats the context or invalidates the COPY layer for
nothing: 467MB transferred per build, 320kB now.
The container build was the one build path that could not learn a version: the
build context excludes .git, so it has to be passed in, and nothing passed one
-- Compose handed the Dockerfile no build args, so every locally built agent
answered "dev" while the daemon reported the tag. The Taskfile now derives the
version from git describe once, for both the host binaries and the image, and
task image:agent passes it through.
docker compose build agent also failed outright: the service named the image by
digest, and Compose refuses to tag a digest. The build-only service names it by
tag now; what a task container runs is still pinned in the daemon's own
[containers] image.
The dashboard upload names its own attachment type, so the check that ran on
it only compared two declarations the sender wrote. A browser can label any
bytes audio/ogg, and the transcriber keys on the attachment type alone, so the
bytes went to the operator's provider regardless.
When the bytes are present the container decides: Ogg, WebM/Matroska, mp4/m4a,
wav, flac and mp3 are the containers a clip is recorded in, and anything else
claimed to be speech is refused before it reaches a transcriber. Magic numbers
rather than http.DetectContentType, which reports application/octet-stream for
the WebM every browser but Safari records.
One gRPC service per domain in state.v1 (tasks, executions, accounts, identities, packages, captures, bindings, access, orgs, alerts and so on), each with its own server type in staterpc. RPC and message names and numbers are unchanged.
The marketplace was one long list of filled Install buttons with the raw
surface name beside each version. Packages now group under Forges, Channels,
Secret engines and the rest, as cards in a two-column grid with a search
box. Installed packages stay listed, marked installed or offering their
update.
An installed extension showed its own version and an Update button whether
or not the catalogue pinned anything newer, so a published update was
invisible. The row now offers 'Update to <version>' when the catalogue's
digest differs from the installed one and no update is already pending.
The check compares two declarations; it never reads the bytes, so it cannot
tell whether a file is what its content type says. The comment and the test
row claiming otherwise have gone, and so has an allowance letting a video
carry an image type, which no producer emits.
A caller that named the attachment type itself -- a browser upload -- must now
also state a content type, since the previous empty-type escape made the check
optional there. The Telegram declared-size rule is deleted: the shared check
runs first with the same ceiling, so only the rule on the bytes actually
received can still fire.
A declared MIME type decides what the Gateway does with a file: a voice note is
transcribed, an image goes to a model. Both acceptance points took that claim
from the caller unchecked -- the dashboard's voice upload and every Telegram
attachment -- so a file could be used as something it is not.
ValidateInbound refuses a type outside the shared vocabulary, content over the
size ceiling, and a MIME type that contradicts the attachment type, with an
error the caller sees: a dashboard upload is a 400, a Telegram file gets a
chat reply instead of a silent drop.
GitHub refuses REQUEST_CHANGES from a pull request's author, so a blocking
finding on the PR a task opened lost every finding. The retry's identical
refusal is now reported once, and forge errors drop the gRPC framing.
An approval, ask or park can be resolved by an operator, a rule, a
classifier or automatically, so the vocabulary stops naming a person:
- step type human.approve -> workflow.approve
- park class needs_human -> needs_decision (ParkNeedsDecision)
- event kinds human_* -> operator_*
- alert kind task.needs_human -> task.needs_decision
- status grouping "needs you" -> "needs attention"
0061 rewrites the stored values, including the approval step type in the
workflow-definitions resource and each task's pinned definition, with the
digest recomputed so resumed tasks still match.
The prd step returns the PRD as structured fields and human.approve takes
them as its document. The plan text every surface reads and the approval
card's layout are both rendered from that one document, so what the human
approves is what the implement workflow is handed. Replaces the separately
generated OpenUI view, which could drift from the plan.
agent.run gains views: the agent may return an OpenUI Lang view of its
answer through an optional view tool, read as steps.<id>.view. human.approve
stores it as the task's plan_view, and the approval card renders it with
the dashboard's own components, falling back to the plan text when there
is no view or it does not parse. The feasibility prd step uses it.
archied, archie-ui and the tool gateway re-read the stored policies on a 30s
ticker, so a forbid written seconds earlier did not stop a run. One
instance-wide revision now moves inside the transaction of every policy write,
and a decision reads it first and rebuilds the engine only when it moved.
A version read that fails, or a policy list that fails after a bump, refuses
with ErrChainUnavailable instead of standing on the last chain, so three call
sites now treat unavailable as availability rather than denial: dispatch leaves
the capture for the next cycle, a task start parks transient, and the tool
gateway reports the tool as unavailable.
A test run used to suppress only forge and push writes, which named one
destination among many. Deliveries now have one seam: TaskContext.Deliveries
records each as "would ..." and performs none, and a recording egress
session does the same for a Kit run's HTTP writes and central tool calls,
answering them synthetically. Provider hosts stay live, since model traffic
is how a test run reads. Native containers have no proxy (archie-core-n8d3).
The classify result required a workflow, and the capture tool rejects an empty
required string on the agent's single allowed call. A task needing no code
change has no workflow to name, so the classification failed instead of
closing the task -- the non-code path could never complete.
Require only what every classification has: whether a change is needed and the
reasons. Name the workflow required-when-true in its description, guard the
handoff on needs_code_change rather than relying on the finish step having
ended the run first, and comment the reasons before closing so the reporter
sees why nothing was built.
The State Store wire described a provider's class, base URL and key variable
but never where its key lives, so every provider reached the daemon
credential-less. A task then built its runtime with no key: the egress session
had nothing to bind and the agent parked on 'APIKey is required'.
Carry api_key_engine and api_key_key alongside the provider. They are a
reference, not a secret; the key is still resolved daemon-side and never
travels to a container.
A container task parked when a provider carried an api_key_env but no
credential binding named after it, even though the task's models never
reached that provider. Egress pre-bound every provider the instance
configures and ignored api_key_ref, so the credentials an operator stores in
provider-settings were never used.
A task's config now carries only the providers its model aliases resolve to,
each with the variable its credential is read from: the operator's
api_key_env, or a name derived from the provider when its credential is a
secret reference. modelEgress resolves that reference once for the session
and the proxy substitutes the session's key for the sentinel, so the
container still holds no key. A provider that only declares an env var keeps
resolving through its org credential binding.
runViaAgent logged the agent's reply status and returned, so a task whose
agent could not persist its own outcome (empty status, State Store down)
stayed running with no park reason while the run read as complete.
A status the task cannot reach from running now parks it, quoting the
status and naming the condition.
* fix(ui): show an extension's accepted authority after it is accepted
* fix(ui): keep a chat reply's streamed text when the turn is stopped or fails
* feat(ui): queue chat messages sent while a turn runs
A turn can pose a questionnaire (single and multiple choice, free text,
skippable) and read the answers back, rendered in the chat with the
shadcn-vue questionnaire. The gateway contract gains a questionnaire ask and a
can_question capability; answers travel as a JSON object keyed by question name
and are checked against the questions that were asked.
Replaces the separate Build with Archie bar and its per-workflow channel, so
every conversation belongs to the account and is listed on every device, and
the command palette is the same everywhere.
Each workflow has its own persisted conversation, rendered like the chat panel.
The canvas and YAML go read-only while Archie works instead of inert. The code
block highlighter loads Go and TOML and drops jsx, tsx and vue.
The run selector is the only control that gives up width, and beside the
workflow list it had none left: Open and the run's version move into the one
menu at every width, so the picked run stays readable from 390 to 1440.
Step editor and binding fields take the next rung (h-8) so they match the
selects and switches they sit beside.
The coarse-pointer rule gave every button, link and field a 44px minimum on
touch, which made the phone dashboard look like a toy and pushed the section
strip into overlapping its neighbours. Controls now keep their own size, and
the shared ladder is one step taller (default 36px, sm 32px) so a finger still
hits something. Inputs stay 16px only where iOS would zoom.
Below md the sections move into a sheet with the current page marked; the bar
keeps brand, search, alerts and the operator. Page titles drop to 18px so the
title and its action sit on one centred line.
The step editor's More disclosure no longer fills when open, so only the
chevron moves. A step card keeps its type chip only when its title does not
already say it.
The editor header is one toolbar at every width: view tabs left, the run
selector and actions right, and a single menu holding the sections that do
not fit, the run's own actions and the draft's change list. Publish is the
one primary action. Restore replaces Discard draft and the per-workflow
Restore default, which settings owns.
The page header no longer wraps, and run rows on a phone no longer squeeze
the run title.
Reserve bottom space for the floating launcher at phone width, drop the
duplicate provider class and the setup guidance sentence, give the source
and model rows room to size, place the Archie bar below the canvas, use the
shared Empty on the not-found page, and let the org overview list titles.
Drop captions that restated headings, cut the duplicate Policies card title,
use the Select component for account roles, let org agent actions wrap on
phone width, and use em-free placeholders.
Drop empty-state essays that repeated their titles, the harness native select
becomes the Select component, and the binding and source forms collapse to one
column below sm. Issue-ID and history narration removed from comments.
The workflow list scrolled sideways off a phone screen and the history grid
pushed the diff off it. Below lg the list becomes a header select with the
draft badge; below md the revision list becomes a select above a full-width
diff, with the two canvases stacked.
The gutter printed one number per source line while the text layer wrapped,
so every line after a long one was numbered wrong. The textarea no longer
wraps: the gutter, the highlight layer and the textarea share one row per
line and scroll together on both axes.
Below md the section tabs that do not fit collapse into one menu that sets
the same tab, and the actions share one right-aligned row. The canvas is
sized to the viewport left on a phone, frames a graph or card wider than the
canvas instead of clipping its edges, and clears the chat launcher.
A coarse-pointer-only floor keeps switches, tab triggers and scrolled nav
strips from being deformed on a phone, and the topbar reveals the current
section after a route change.
settings_get now reads three more kinds:
- soul, the instruction text layered into a workflow run;
- task-policy, the diff cap and alert delivery settings;
- org-model-policy, which models an org may use.
None of them holds a secret value: task-policy's notify_secret and the
secrets elsewhere in the readable kinds are SecretRef references (engine and
key), never the resolved value.
access_policies_list is new: the caller org's Cedar policies (id, level,
scope, text), and the instance policies when the caller owns the instance,
which is what the dashboard lists for the same read. It is guarded as
access.ActionRead on access.KindPolicy, the check the dashboard makes.
IntegrationSource gained Policies, implemented over the State Store's
ListPolicies.
workflow_get now says how its instructions field layers: after the
instance's and the organisation's, before the repository's.
The Access area mixed organisation, instance and personal settings under
one name. Split them: /org is the organisation's own area (members,
identities, connections, models, schedules, playbooks), /settings is
instance administration only, and personal security stays in the account
menu. Setup checklist steps now link to the page that fixes them.
The seeded root connection was called "Instance forge", which names two
archie concepts an operator never chose. Name it for the host it points at
instead.
Drop the sentence explaining that the credential is a reference and that an
identity with no entry is not granted: both lectured at the operator instead of
labelling the field. The external account needs no hint, the forge type keeps
one line saying where the value comes from, and the identity button reads the
way the credential-grants control already does.
A Connections page under Settings lists the organisation's forge connections:
host, forge type, the reference to the credential (never its value), the
external account it belongs to, and the operations each execution identity may
perform through it. The chat agent's page registry names the page too.
The connections kind joins the live resource watches. On a new revision
archied re-resolves the instance forge from the settings it just published and
replaces every holder of the client: the boot forge, the worktree token, the
daemon's root forge and the root task RPC servers, which are now returned from
registration so a task that is already connected asks the new credential
rather than the one the process booted with.
This commit also carries the execution-identity agent's concurrent edits to
these three files, which the shared working tree had not committed yet.
Layering reads forge-connections and takes the root connection for the
instance's own forge, keeping the file's webhook intake and secret, which are
instance infrastructure rather than an account. A document with no root
connection disables the forge instead of falling back to a credential the
operator may have withdrawn.
A connection is an organisation's own resource: the forge host, the
credential reference and the external account it belongs to. It records a
reference, never a token value, and names per execution identity the
operations that identity may perform through it.
The file's [forge] sections seed it: the root's becomes the root connection
and each identity's own forge becomes a connection only that identity may
use, so the migration keeps exactly the grants the file expressed.
Personal API tokens are the signed-in operator's, and the instance URL and
OIDC providers are the instance's, so neither belongs under the organisation
Access area. Tokens render in the account page and Authentication moves to
Settings; the old paths redirect.
Personas were a misread requirement: SOUL is the chat identity and
identities are per action. The selected persona's prompt never reached the
model. Drops the resource, /personality, the chat selector, the settings
page and ChatService.SetPersona, and deletes stored persona documents.
workflow_list, workflow_get and workflow_step_types read the org's
definitions and step catalog; workflow_validate runs the editor's save
check on a proposed definition without saving it.
The source repository is private, so the updater and install.sh got 404.
Releases are now published to samcharles93/archie-releases by
task release:publish.
Cap concurrent streams, the handshake and dead peers' streams on every
service, drain shutdown for at most 10s, and stop messaging when its
listener dies instead of running on without Deliver.
Replace the service bearer tokens with [tls] ca_file and cert_dir. Caller
identity comes from the verified certificate, not metadata. Without TLS,
services listen and dial on loopback only. Task containers get only the CA
and keep their grant.
Remove controlplanerpc.NewClient (superseded by NewRPCClient), Loader.Overlay
(-config-overlay reaches Resolve directly), and setup.Run (RunParams is
the live entry point). Move ResolverFunc into a test file, since only
tests adapt functions to the egress Resolver.
A writable agent stage that passes now marks BuildNoChanges; repo.commit
clears it when the stage commits changes. The flag had no setter, so the
signal was lost in the YAML migration. The outcome of an empty commit
stays with if_empty: unset still fails, complete closes the issue, skip
moves on.
Remove gateway re-exports of messaging helpers with no callers, the
unused DeltaFunc adapter, DefaultPersonas, NewStoreTaskCreator, the
SortBySeq stub, and the in-memory session store that nothing constructs.
Gemini 3.x/4 chat now routes through the Interactions API transport, which
replays thought signatures on tool turns; long decode stays opt-in. Also
takes go get -u updates (x/*, genproto, goose, nats-server, modernc sqlite).
Restore provider groups and concrete model references in chat snapshots. Permit catalog selections while retaining named aliases and tenant model restrictions. Show the active model in /profile without requiring a task identity.
Refs: archie-core-mvek6
* feat(archied): read-only run-scoped sandbox view over the harness contract
Serve RunTarget: the daemon resolves a running task and attempt to its Kit
container and follows its output, refusing a finished or unknown task with a
stated reason. The dashboard adds a Sandbox tab behind the task log's read
authority. Takeover stays out of scope until the sod1 authority is wired.
* fix(archied): scope and close sandbox views correctly
Forward harness activity into container output, bind containers and dashboard views to their attempt, enforce the asserted org, and report unavailable dependencies and interrupted streams accurately.
Refs: archie-core-qi91, archie-core-252tj
A test run pins a validated draft, runs with forge and push writes
suppressed and recorded per step, and is excluded from workflow stats.
The History tab lists revisions that changed a workflow, diffs them as
YAML and on the canvas, restores into the editor, and ties runs to the
revision they used.
* fix(ui/topbar): replace Jump to with a command palette, drop filler chrome
Jump to opens a shadcn-vue Command dialog that finds pages, tasks and
workflows by name. The connection indicator shows only when the stream is
lost, the dead documentation link is gone, and the profile menu label has
no stray whitespace.
* fix(ui): trim stray whitespace from template text and drop em dashes from copy
Element text that started or ended with a line break rendered with leading
and trailing spaces. Also removes the unused 'soon' nav state and the nav
group components no route reaches.
* fix(ui): drop the space a hidden spinner left before button text
* fix(ui/status): one dense Status page, full-width settings, problems-only apply status
Status drops its tabs and the duplicate health card; services list only
what is wrong. Settings pages use the full width, the resizable sidebar
handle is gone, and apply status shows only processes that have not
applied a change. PageHeader puts the title and actions on one line.
* refactor(ui): use shadcn ToggleGroup and Badge, drop SegmentedControl and StatusPill
Status badges show only when a state needs attention: no Running, Enabled,
Active, Listening or live pills next to healthy rows. Removes the unused
pagination, radio-group and scroll-area components.
* fix(ui/history): use the shadcn Table with fixed columns so nothing is clipped
* fix(ui/workflows): apply ?workflow= only once the workflow is listed
Selecting it before the definitions loaded opened an empty canvas.
* refactor(ui/workflows): use shadcn Input, NativeSelect, Checkbox and Button in editors
Replaces hand-rolled inputs, selects, the repository mode switch and icon
buttons in the workflow editor, bind dialog, harness page, sources panel
and review gate. Adds the upstream shadcn-vue NativeSelect.
* style(ui): rounded-rectangle controls instead of pills
Halves the radius scale so inputs, selects and buttons stop reading as
pills, and badges and chips lose their full rounding.
* fix(ui/alerts): centre the bell's failed state and stop it contradicting Needs you
* fix(ui/tasks): one header line, aligned columns, no placeholder issue numbers
Tasks puts its filters beside the title and drops the stat tiles the
dashboard already shows. Sort headers align with their cells, chat tasks
no longer show their synthetic issue number, and Logs and the task
not-found page use the shared header.
* fix(ui/dashboard): shared header and cards, empty cards stay silent
Needs you uses the shadcn Card and drops its duplicate Open button; quality
gates and token outlook render only when there is something to show; the
throughput strip moves into the dashboard, its only user.
* refactor(ui/stores): one Pinia store per feature
Splits the site-wide control-plane store and the module-level refs into
settings, workflows, tasks, events, org and session stores. Identity
requests move into lib/api. Drops store fields nothing read: per-resource
stream state, the states map and loadApplyStatus.
* fix(ui/org): one header for the org area, sections drop their repeated titles
The org name is the page title with the admin's org switcher and New org
beside it; Members and Workspaces tables sit in cards like other pages.
* fix(ui/events): shadcn Tabs for the capture, map and bind steps
Replaces the numbered step strip with line tabs that carry each step's
count; the Listening pill is gone and Capture off shows only when it is.
* fix(ui/workflows): confirm a workflow delete in an AlertDialog, not window.confirm
* style(ui/settings): denser setting rows
* feat(state): durable operator alerts owned by the State Store
Alerts dedup on org+kind+subject, resolve themselves when a condition
clears, and are raised, resolved, dismissed and listed through the state
contract. Task transitions raise needs-human and failed alerts in the same
transaction; the store checks service health and prunes closed alerts.
Each raise and resolve queues a webhook delivery whose attempts are kept.
* feat(notify): deliver operator alerts to the webhook; raise config and release alerts
notify.webhook now receives raised and resolved alerts above a severity
threshold with HMAC-signed payloads, bounded retry and every attempt recorded
on the alert. archied raises model alias, provider and credential-binding
alerts from the effective configuration, an update alert from the release
channel, and a credential-rejected alert from the egress resolver. The
dashboard API lists and dismisses the caller's org's alerts.
* feat(ui): alert bell in the top bar and webhook alert settings
The bell lists the org's open alerts by severity with dismiss and a link per
alert, and refreshes from the event stream. The task settings page gains the
webhook severity threshold and signing secret. ui/dist rebuilt.
* fix(postgres): scope OpenPRs to the caller's org
A principal-carrying caller read every org's pr_open tasks. The query now
honours the request scope; the daemon's unscoped review scan still sees all
orgs.
Issue: archie-core-kgxw.23
* fix(statestore): serve task logs only to the task's org
ReadTaskLog and StreamTaskLogContent took a task ID and read the file with
no org check. The State Store's task-log reader now confirms the task is
visible under the caller's scope first; unscoped services read as before.
Issue: archie-core-kgxw.24
* fix(postgres): scope ListPolicies to the caller's org
Every org's policy text reached any principal-carrying caller. A scoped read
now sees its own org's policies, plus instance policies when scoped to the
system org. The engines and the lockout guard decide for every org, so they
read the full chain unscoped: the dashboard engine loads without the
request's principal and the guard lifts the caller's scope.
Issue: archie-core-kgxw.25
* fix(postgres): scope identity reads to the caller's org
ListIdentities and GetIdentity (and its alias fallback) returned every
identity to any caller. A caller scoped to an org now sees only that org's
members and assigned agents; the system org and unscoped services still see
the whole instance.
Issue: archie-core-kgxw.26
* fix(postgres): hide instance status from other orgs
ListPresence, ListChannelStatus, ListApplyStatus and GetConfigSnapshot
answered any org principal with instance-wide state. They now return nothing
unless the request is unscoped or scoped to the system org. The dashboard
reads the published config as itself, since its handlers project it for
callers of every org.
Issue: archie-core-kgxw.27
* feat(postgres): assign new agents an org and role at creation
A bot or service account created through the API served no org until the
next State Store boot granted it one. Create now assigns it to the org the
request acts in with the developer role in the same transaction, so it is
authorized immediately.
Issue: archie-core-kgxw.14
* feat(edastore): create event records in a chosen workspace
Sources are created in a workspace of the caller's org, the default one when
none is named; event types and bindings take their source's workspace and
mappings their event type's, the same rule the org backfill applied. The
binding, mapping and event type contracts carry the workspace, the four list
endpoints accept ?workspace=, and the Events page has a workspace selector
that filters every step and picks where a new source goes.
Issue: archie-core-kgxw.11
* feat(webui): authorize a record in its workspace
The API built every access request with no workspace, so workspace
policies and per-workspace roles never applied. A request naming a source,
binding, mapping, event type or task now reads the record's workspace under
the caller's scope and authorizes in it; tasks carry their workspace on the
State Store contract for this.
Issue: archie-core-kgxw.9
* feat(access): expose workspace environment to policies
Policies can test resource.workspace.environment. The workspace attribute
is the workspace entity, which carries its environment; the principal
brings its org's workspaces from the State Store, so the dashboard and the
daemon's run checks describe a resource's workspace without another lookup,
and the daemon now authorizes runs in the task's or binding's workspace.
Issue: archie-core-kgxw.10
* fix(webui): ask read_secret when a source secret is read
Rotating a source's secret returns its value, but the route asked update,
which every developer holds, so no policy could narrow who reads a secret.
It now asks read_secret on the secret, which the shipped roles give admins
and an object policy can narrow further.
Issue: archie-core-kgxw.17
* refactor(org): delete the unused upgrade-incomplete sentinel
Nothing returns org.ErrUpgradeIncomplete: the State Store finishes the org
upgrade before it serves.
Issue: archie-core-kgxw.18
archied update install verifies the release zip, checks every binary
reports the release, pulls the agent image by digest, backs up the
database in-process and stages the binaries before handing off to
archied update watchdog in its own process. The watchdog restarts units
in release order, requires archied healthy for 120s and otherwise rolls
back binaries and image policy, restoring the database only when a
migration ran. Boot recovery resumes the frozen watchdog.
Deletes scripts/archie-update-install, scripts/archie-update-watchdog,
the updater's --from-source and --auto, CommandInstaller,
ScriptInstaller and the update-image and update-topology subcommands.
* fix(webui): accept the merge task action
The action whitelist omitted merge, so the dashboard's Merge button on a
pr_open task was refused with 400 unknown action.
Closes: archie-core-slpoz
* fix(workflow): give each parallel branch its own outputs
Branches shared the task's Outputs map, so concurrent declared-output
writes raced (or were lost when the map started nil). Each branch now
writes a copy; join merges new outputs in branch-name order and refuses
one written by two branches as a second write.
Closes: archie-core-3a7w2
* fix(postgres): dispatch captures oldest first and keep pending ones
ListUndispatchedCaptures ordered newest first and listed captures no
binding can match (failed HMAC), so sustained intake starved older work
and bad signatures held the batch. It is now oldest first and lists only
dispatchable captures. Count retention no longer evicts a capture that
is still pending for an armed binding. The daemon lists only sources
with an enabled workflow, so captures waiting on a disabled one do not
hold the oldest-first batch.
Closes: archie-core-2et4b, archie-core-o0s0z
* fix(ui): refuse renaming a workflow onto an existing id
Saving upserts by id, so editing a workflow's id to another workflow's
id removed the open one and overwrote the other. The editor now refuses
that save and says why.
Closes: archie-core-wpoz8
* fix(workflow): reject unknown step settings at save
Step factories decoded settings with yaml.Node.Decode, which drops keys
it does not know, and settings-less steps ignored settings entirely, so a
misspelt key (readOnly for read_only) saved and silently did nothing.
Every factory now decodes strictly and settings-less steps refuse
settings; ParseDefinition runs the factories, so the save refuses them.
Closes: archie-core-8b5nk
* fix(postgres): keep a stored capture when its prune fails
InsertCapture committed the capture, then returned the prune's error, so
intake answered 500 and a sender without a delivery header retried into
a duplicate capture and a duplicate dispatch. A failed prune is now
logged and the stored capture's id returned.
Closes: archie-core-3miuh
* fix(crondelivery): fail and advance a job no runner can deliver
Router.Run returned nil for a kind with no runner, so the engine reported
a successful run while the schedule never advanced and the job fired on
every tick. The run now fails with the refusal, which the engine reports,
and the schedule advances (a one-shot is removed). The router's own
refusal event is gone with it.
Closes: archie-core-s6ahh
* fix(taskactions): stop the runs of cancelled callees
CancelExecution cancelled a caller's waited-on callees in the store, but
only the caller's run was stopped, so callee containers ran to the end.
CancelExecution now returns the callees it cancelled (nested included)
in place of the step ids nobody read, and every cancelling action stops
their runs too.
Closes: archie-core-9labz
* fix(workflow): treat a zero json.Number as false in when
Task inputs and step results decode numbers as json.Number, which truthy
did not unpack, so when: inputs.count held for a count of 0.
Closes: archie-core-uv270
* fix(webui): read a workflow's runs with a workflow-filtered page
The workflows page and the canvas run picker filtered the newest 100
tasks of every workflow client-side, so on a busy instance a workflow's
older runs were invisible. GET /api/tasks takes a workflow filter, carried
through the State Store's Tasks request to the query, and both views ask
for the selected workflow's runs.
Closes: archie-core-tpiw1
* fix(ui): load the restored workflow into the editor
Restore Defaults saved the shipped definition but left the open draft in
the editor, still marked unsaved, so a later save re-applied it. The
editor now reloads the restored definition.
Closes: archie-core-85e7w
Every attempt checks that the identity that started the task and the
identity the workflow declares may both run it, recording a denial for
either. A workflow that declares no identity is refused rather than
running as its starter or the root. A workflow.call callee is started by
its caller's declared identity instead of inheriting the caller's row.
The workflow settings panel marks the identity as required and offers
the agent identities.
InsertChatTask and EnqueueCallTask computed MAX(issue_number)+1, so
concurrent inserts in one repository took the same number and the second
failed on the unique key. Both now bump a chat_issue_numbers row, seeded
from the existing maxima, whose row lock serializes allocation.
EnqueueBindingTask now takes the capture and claims the ledger row,
inserts the task, stamps its provenance and links the ledger row in one
State Store transaction. A failure anywhere leaves the delivery
undispatched for the next cycle; a replay or concurrent claim is refused
by the ledger's unique index. SetDispatchTask is removed.
Members and Workspaces get fixed column widths and their add forms move
into labelled sections. Agents lists agents first and moves credential
grants below. Access puts New policy in the card header. Tokens states
when none exist.
POST /api/orgs/{id}/members binds a person by subject, or by email as a
placeholder. The first sign-in whose provider vouches for that email
claims it: the State Store moves the binding onto the provider's subject
in one statement, so a second account with the same address finds
nothing to claim and later sign-ins rest on the subject alone.
The pinned definition carries the package a run's authority is read
from. A task-scoped Update now reaches the store without a definition,
and UpdateTask keeps the stored pin when none is sent; the workflow name
still moves for handoffs and the daemon re-pins it.
Webhook intake answers 503 and counts no refusal while the chain loads.
The readiness probe reads the chain on every check. The UI never exits on
a first-load failure. An invalid instance policy closes the instance but
lets an instance admin repair policies. Outage pages are 503, and the
health detail names the unloaded chain.
The dashboard serves plain HTTP, so a non-loopback bind carries the
session cookie and provider token in clear unless TLS terminates in front.
Warn at startup unless the operator declares a proxy with
[web].trust_forwarded_headers, and record the choice in deployments/README
where the dashboard is deployed. Point the non-loopback token error at
that surviving doc, not the deleted UI-boundary PRD.
IsLoopback(":8484") returned true: the empty host fell through the
switch as loopback, so a wildcard bind skipped the non-loopback token
requirement and served every interface unauthenticated. An empty host is
the wildcard, not loopback.
The four subtests share one bare repo but pushed the same feat/1-test
branch. Their commits have the same tree, message, author and parent, so
two commits in the same second hash identically and the second push is a
no-op -- passing by luck -- while a second of clock drift makes it a
non-fast-forward failure. One issue per subtest gives each its own branch.
A State Store that was unreachable at startup left the access chain nil,
and authorize treated nil as no chain at all: every request passed the
credential check, no principal or org reached the context, the State Store
defaulted each call to org-sys, and the instance-only surfaces were served.
The dashboard stayed open until a restart.
Build a chain with no engine when the first load is Unavailable; it refuses
every request with 503 (or the notice page for a browser) until the first
load succeeds, and Run keeps retrying so the dashboard recovers without a
restart. A denial is not recorded, because nothing was evaluated.
Sessions carry an org; listing, reading and writing a session, its
messages and its turns are limited to the caller's org. Another org's
session reads as not found and cannot be overwritten or appended to.
Sessions from before orgs belong to the system org.
The State Store answers the calling principal's org aliases
(CallerModels) and bills chat usage to that org; usage records no longer
carry a caller-named org. Chat lists and resolves aliases for the
caller's org and fails rather than substitute one it may not use.
The system org sets each org's allowed models and whether it may add its
own providers (org-model-policy); an org with no entry may use nothing.
An org's aliases and providers are checked against that policy on save
and filtered by it at resolution. Tasks get their org's providers, keyed
by the org's credential binding through the egress proxy. Org Settings
gains a Models tab; instance Models gains Org access.
The State Store answers a task's effective model aliases (instance aliases
with the task org's own over them), deriving the org from the task. Model
egress and the run credential resolver use the task's stored org instead
of the identity mapping in config.
Task agent runs and MCP sampling record against their task (billed to the
task's org); gateway chat turns, titles, sampling and curators record
against the system org. Rows carry source, workflow, step, alias,
provider/model and tokens for later chargeback.
Agent steps, implement, pr-review, MCP sampling, chat, embedding and
transcription resolve a model alias (empty means the purpose's default)
and fail on an unknown alias instead of falling back. The step editor and
chat pick aliases; workflow definitions naming an unknown alias are
refused on save.
The setup terminal created its PTY at a fixed 24x80 while the browser
measured its own box and threw the measurement away, so a full-screen CLI
login drew into a corner of a much larger xterm.
OpenRequest now carries a ConsoleSize with the target frame; the route
reads cols/rows from the WebSocket URL, falling back to 24x80 when they
are absent or out of range, and the daemon creates the PTY at that
geometry. The component sends the size it measured before connecting.
Live resize is the follow-on: it needs a control channel on the WebSocket,
which today is a raw byte copy.
A setup session started its container with "sleep infinity" and opened the
PTY with "sh -l". Neither binary is guaranteed: the spec capability whose
floor is a shell and bash is com.docker.sandbox/sbx@1, and archie's
supported map does not list it, so a Kit image need not provide either. A
missing sleep killed the container at start and a missing sh failed the
exec, both as an opaque error.
The container now runs archie-agent hold as its entrypoint. The agent
binary is archie's own and already mounted into every Kit, so the
keepalive needs nothing the image may lack and the container env stays
empty. Before opening the PTY, harnesssession probes for bash then sh and
returns ErrNoShell naming the Kit reference when neither is present.
Test: TestPickShell covers bash-preferred, sh-only, neither, and a probe
that cannot run.
task setup installs the golangci-lint CI pins, the protobuf generators and
the dashboard dependencies, and warns by name about the tools it cannot
install (Go, Task, Node, Docker).
The linter version now lives in one file read by both the setup task and
both workflows, so a local checkout and the gate cannot run different
linters.
Only the daemon owns containers, and the dashboard consumes a harness
session over its gRPC contract. Go imports are atomic, so a single
reference relinks a runtime, and the boundary holds only while something
re-measures it. cmd/archie-ui/architecture_test.go enforced this until it
was purged with the test suite; nothing enforced it since.
The restored check runs go list -deps . and fails if the dashboard links
internal/container, internal/app/archied or internal/agentexec. It is
transitive, which is what "links" means, and runs in the existing test
step.
forward intercepted a declared OAuth credential's token endpoint only when
the run was granted the service. For an optional credential it fell
through to the reverse proxy, so the provider's real access and refresh
tokens reached the container un-sentinelized, contradicting the harness
contract's "the real credential never enters the container".
A matched token endpoint is now refused when the service is not granted
(403 for an optional credential; a required one keeps its existing 502).
The table test drives forward against a recording upstream and asserts
both the status and that the upstream was never contacted.
The dependency bump moved sandbox-kit-spec from v3.0.0-m.6 to m.8 without
adapting the code, so the tree no longer builds: CredentialCapability.Phase
is now spec.Phases, not a string (internal/infrastructure/egress), and
Client.Assemble became a package-level fetch.Assemble that takes a Loader
and a LayerValidator instead of spec.MergeOptions (internal/infrastructure/
kitrun).
Migrating to m.8 is not a version-string change: m.8 pushes kit integrity,
safe layer extraction and resource limits onto the caller, so it is
security-relevant work, not an unblock. Pin back to m.6, which the code is
written against, and leave the migration to a deliberate change.
Verified: go build ./..., go vet ./..., go test -short ./... all pass with
this pin. The gate's ui:check and lint steps fail for unrelated
toolchain reasons recorded separately.
The dashboard's setup terminal was a 503: it had a WebSocket route, an
authorizer and an xterm.js surface, but nothing owned a container. The
daemon owns containers, so the session contract lands there and the
dashboard consumes it over a new gRPC contract.
One session concept, two targets. A setup session is addressed by Kit
profile and is ephemeral; a run session (archie-core-qi91) is addressed by
task and attempt and is bounded by the task. This slice serves setup and
answers Unimplemented for run.
The contract, the authorisation, the lifetime and the egress phase are
settled in docs/prds/external-agent-harness.md, "Session contract". The
short version: the daemon serves harness.v1.HarnessService; the dashboard
authorizes the operator as an update on the secret and then dials the
daemon with the harness service token, required even on loopback because a
session is a shell holding an org's credential; the setup container runs
no worker, mounts no worktree, holds a keepalive, and carries an empty
container environment. Install hooks run at the install phase and the
session enters runtime before the shell, so a runtime-phase credential's
token endpoint is the one the proxy intercepts.
Capture is gated by the egress proxy on a granted service, and a setup
session has no task, so the daemon registers a session grant: the
session's proxy token resolves to the org's bindings for the Kit's
declared services. The real token never enters the container: the token
endpoint response is sentinelized and stored as the org's harness secret.
Every teardown path releases the pool slot, revokes the egress session and
the grant, removes the sandbox network, and removes the session's volumes.
The listener requires HARNESS_TOKEN and stops with a 10s grace before
Stop, so an open session cannot hold shutdown to the watchdog leash.
29 of 59 directives did nothing. Removing each one individually and
re-running the gate revealed no issue from any of them: 20 named gosec,
which is not enabled in .golangci.yml and never has been, plus 4 nilerr
in functions that return no error, 2 dupl where dupl reports nothing
repo-wide, and one each of contextcheck, nestif and unused. The funlen
name on settings.go:147 is gone for the same reason; its gocyclo and
cyclop names are both live.
The unused directive in webui/authorize.go sat on `var _ = slog.Default`,
a statement that only existed to keep the log/slog import alive. Both go.
The 30 remaining directives all suppress a real issue.
disableProvider already cleared a failed provider's credential, but that
made it indistinguishable from a provider nobody configured, so
usableProvider fell back to the catalog's ambient env var (e.g.
OPENAI_API_KEY) and sent turns with a key the operator did not choose.
Mark the provider Disabled when its key fails to resolve, refuse it in
usableProvider, and carry the flag through mergeProviders so a catalog
refresh cannot resurrect it.
A scheduled job runs unattended, so a payload that restarts the daemon,
formats a disk or powers the machine down is refused when the job is
created rather than when it fires. scheduling.RefuseDangerousJob is the
one rule every creation path reaches: the dashboard, any control-plane
client and the config seed all replace the schedules document through the
same validator, so a new token is added in one place.
Delete the hand-rolled MiniMax HTTP/poll client; ai-sdk v0.1.43 already
ships provider/minimax implementing video.Provider with the same endpoints,
defaults and poll semantics. The tool now takes a video.Provider and the
composition root builds it, matching the transcription and embedding
capabilities.
A drain pass no longer waits for the tasks it submitted, so -once (the
systemd timer and test invocation) returned while their containers were
still running and the process then tore them down. Wait for the pass's
tasks here, restoring what the flag means.
A wait:true workflow.call run held its global slot and its repo's place for
the callee's whole life, and the drain pass waited for its own tasks, so a
callee queued by that pass was never claimed. With containers.max_concurrency
saturated, or a repo that does not allow concurrency, the wait could not end.
A drain pass now returns once the stream and the claim fallback are empty, and
shutdown waits for in-flight work once. Suspend/Resume give a run's slot and
repo place back while it waits on a callee, driven by the workflow call events
on the daemon's bus; a hold records one slot and one place, so a second
re-acquire gives back what it took.
golangci-lint failed on the change and had not before: gofumpt wants
StartCall's same-typed parameters grouped, and runWorkflowCall reached a
cyclomatic complexity of 16. The unwaited call's early close moves into
closeUnwaitedCall on *TaskContext -- it needs only the call step, the
callee and the settings -- which leaves runWorkflowCall below the limit
with its behaviour unchanged.
The walk's id-less call case is deleted: ParseDefinition now refuses that
definition before validateWorkflowCalls runs, so it passed for the wrong
reason. The refusal is pinned where it happens instead, by the compile
case in TestWorkflowCallKeyIsTheDeclaredPath, now asserting the whole
message so it still names the step it refused.
A call's key was the step's declared path alone, so one task running a
second definition at a colliding path -- workflow.handoff, human.approve
and a definition re-pin all change it -- was handed the first callee's
child, waited on the wrong workflow and published its outputs. The key
now carries the callee too, while the step row and the call's events stay
named and staged for the call site, so a rail pairing an event with its
step still attaches them.
A child that reached dead or closed_wont_do can never do the work and
holds no result the caller can use, so it leaves the call key's index and
frees the key for the caller's retry to start a fresh child. parked and
rejected keep theirs: a parked child is recoverable by retrying it, and a
rejected child ran.
The id a call step must declare is now refused where the definition is
compiled, which is also the path a pinned definition takes, so an id that
spells a step type is accepted again and no stage needs a heuristic.
A call site had no durable identity, so any retry of it -- a lost
EnqueueCallTask reply, a failed call-step record, a requeued attempt that
re-runs the stage -- started a second child and its work happened twice.
The call step's declared path within the run is that identity: wrapStep
sets it (branch-qualified, restored on return), a workflow.call step must
declare an id so two call sites cannot share one, and the key crosses
EnqueueCallTaskRequest.call_key into tasks.call_key, which EnqueueCallTask
upserts on so the retry returns the child already started.
Bump github.com/samcharles93/ai-sdk v0.1.40 -> v0.1.41. ai-sdk now sends
max_completion_tokens for reasoning models and omits temperature when the
model rejects it, so the max_tokens workarounds are no longer needed: the
chat-turn bound is set directly and MCP sampling loses its reasoning
branch. Classic models keep their existing bounds.
The file overlay path has folded partial map-valued entries since
a9029411, answering xrux's open question: a decode that zeroes omitted
fields is the old behaviour, kept only by the now callerless runtime
overlay. Loader.ApplyOverlay, ApplyOverlayValues and
applySchedulingOverlay had no callers anywhere in the tree, so the fold
machinery stays and the dead runtime path goes.
The artifactsync client had no importer and [artifacts] parsed but was never
read, so the capability was dead. Remove the package, the config field and
type, the token defaulting, and the example section. A leftover [artifacts]
key now reports as unrecognised, like any other removed key.
SOUL now owns the prompt identity slot via a per-turn source: a stored soul
resource wins once saved, otherwise the identity's SOUL file, then the
shipped default. The gateway watches the resource so a dashboard edit
reaches the next turn without a restart; a file read error degrades to the
default and logs once.
The persona prompt plumbing is replaced by the SOUL source; the persona
surface itself (registry, wire, page, commands) stays for archie-core-7ftt.
Add ListSkills, CuratorHealth and ReloadChannel to the gateway chat contract. The
Gateway process supplies its live skill catalogue and curator registry through a
Catalog seam; archie-ui adapts the RPCs to the webui view interfaces and wires
them in compose. The Gateway hosts no channels, so ReloadChannel answers
Unavailable here; the channel request surface is archie-core-np7l.
The daemon stopped setting forge state labels when label-driven retry was removed; the config field, helpers and defaults had no consumer. Remove them and the Scheduling policy page's State labels section.
A review reaction that landed while a remediate run owned the task failed the
pr_open guard, was acked and dropped, and the poll cursor advanced past it.
Runs against one task are serialised, so the unit is appended to
tasks.pending_reviews instead; the transition that returns the task to pr_open
promotes the oldest waiting review back to queued. A re-delivered unit is
absorbed by payload equality, never queued twice.
Pick a source and one of its captured events, map each declared input to a
payload path or a fixed value with a live preview, and save the mapping and
binding together. Existing bindings open from Starts when for editing and
approval; the Start node updates at once.
Each finished stage records the run's step results; a retry may name a resume
point, and the next attempt skips the steps before it with their results
loaded. A run with a repository resumes only on its pushed branch. The canvas
offers Resume/Re-run from here on parked runs.
ContainerRuntimePage still bound the Go field names the document carried
before archie-core-qna6 gave container-runtime-policies its own snake_case
shape. Every control read a key the document does not hold, so the fields
rendered empty and DurationInput warned on each mount; the page's Profiles
section wrote to a key the decoder drops. Bind image, max_concurrency,
max_uptime, volume_ttl, pull_policy and network, drop the dead Profiles
section (named profiles live in the agent-profiles resource, filed as
archie-core-x0wk), and pin the key list in a test the migration lacked.
Settings -> Advanced rendered nothing in any deployment: its only card needs
the sandbox dangerous-command authority, which has no implementation
(archie-core-sod1). Drop it from the sidebar, the router and the gateway's
dashboard page index; the page and its components stay in the tree for sod1.
Register CardAction in SetupPanel and EmptyDescription in TaskLogs, which Vue
was resolving to nothing, so the setup percentage and the log empty-state
descriptions render again.
module_dir, logextract and examples/modules go with the Yaegi loader. The plugin
reconciler had only the module directory left to watch, so it goes too.
Nothing consumed plugin.Plugin. The daemon's capability host held only those
plugins, so it goes too. The lint fix to the extensions access test rides along.
agentexec's wire contract, harness adapters and log forwarding no longer
import the AI SDK; the in-process model loop, runtime, tool set and sampling
helpers that do now live in agentexec/modelloop, used by the Gateway and
archie-agent only.
internal/domain/workflow imported internal/agentexec for its protocol types,
pulling the AI runtime into every binary that touches workflow types. The
request, result and runner contract now live in internal/domain/agentrun;
agentexec keeps the runtime. The model catalog cache moves from servicekit
into modelcatalog and WaitForPeer into staterpc, so archie-state-store and
archie-messaging no longer link the AI runtime.
State Store calls from the daemon, Gateway and Messaging wait for the store to
come up, so start order no longer matters; the daemon's state_db probe carries
its own deadline so an outage reports degraded instead of hanging. The
Gateway retries its first NATS connect. A restarted daemon reuses the embedded
broker's previous port and token, so the Gateway reconnects instead of
holding a dead address. Fixes a nil catalog the catalog move introduced.
archie-gateway no longer links the daemon, the web UI or archied. Shared
runtime layering, watches, catalog, NATS discovery and the State Store client
live in servicekit; chat task profiles in chattask. The Gateway waits for the
daemon's NATS endpoint instead of starting a second broker, and chat
approvals go through the task-action client instead of a local service with
no daemon behind it. Version stamping uses buildinfo only.
A secret engine is now a subprocess serving secretengine.v1, installed through
the package store's new extensions family and enabled by extension-settings.
bws leaves the binary, as do the Yaegi engine loader and its examples.
The diff only trims three ignore rules (`.impeccable/`, `.serena/`, `/site/`) and their associated comment from `.gitignore`, so a single subject line captures the whole change.
Remove PRD/doc paths, bead IDs, phase notes and deleted-test references
from comments; drop test-only hooks left by the test deletion. Includes
in-progress archied bootstrap, gateway and query changes.
Replace CLAUDE.md with a short decision-rule constitution; move PRDs,
architecture, development and design docs and repo skills out of the tree;
delete the docs tooling (docsgen, prdlint, docdrift, docsite, contractaudit,
reachaudit) and its gate steps; stop install.sh copying repo skills into
runtime skills.
A "reduce Taskfile bloat" refactor (0d35e753) removed the fixpoint loop from
task fmt and deleted the guard test that proved it, putting the tree back to a
single go fix pass with nothing left to notice. One pass is not a fixpoint:
stditerators rewrites `for i := range t.NumFields()` into a field iterator that
copies its loop variable, and forvar only deletes that copy on the following
pass, leaving a tree copyloopvar rejects. archie-core-wwho regressed silently.
Restore the loop and the guard. The deploy workflow has always inlined its own
single `go fix ./...`, which is how the same hazard reached CI as a spurious
git-diff failure rather than a lint error (archie-core-6kda); it now calls task
fmt, the one owner of the formatter sequence, and its guard rejects an inline
copy so the split cannot come back.
The gate resolved a citation with a filesystem stat, so a directory left behind
by a checkout that removed its files -- internal/gate and internal/gate/gateeval
among them -- resolved on the developer's machine and did not exist in CI. The
baseline was generated that way, so it passed locally and failed CI on the same
commit, which is the state a gate must never be in.
Read the tracked tree from git ls-files and resolve against that: a tracked
file, a directory containing tracked files, or a file-shape template matched
against tracked siblings. Failing to read git is fatal rather than a fallback to
the filesystem, because the fallback is the bug being fixed.
Regenerate the baseline, which now records the citations the filesystem check
was masking. Verified by running the tool in a clean worktree at HEAD: identical
counts to the working tree, exit 0.
The layering rebuilds cfg.Tools from the control plane's projection wholesale,
and ParallelToolCalls was a plain bool. A tool-settings resource seeded before
the field existed therefore carried no key for it, the zero value replaced the
operator's file-level parallel_tool_calls = true, and the setting was inert --
on exactly the stores that cannot be re-seeded, which is the case a new field
has to reach.
Make it a *bool: the shape schedulingPolicy.Label documents, and the shape the
mcp headers in this same function already use. Absent now means "leave the
file's value in force", an explicit stored value still outranks the file, and a
server with no file entry has nothing to inherit and keeps the zero value.
archie-core-ndm8 accepted the command-step trust decision, so a stored
workflow definition may run operator argv. The workflow engine has exactly one
call site -- agentworker, which is what the container agent serves -- so the
step runs on the container path by construction. A non-zero exit parks the run;
level: warn makes it advisory.
Settings mirror the repository gate's command shape (name, argv,
expect_failure) so a command means the same thing in both places. The settings
type is local rather than agentexec.Command because that struct carries JSON
wire tags only, and YAML decoding silently dropped expect_failure -- a command
declared to fail would have been reported as passing. A reflection test holds
the two shapes together.
bot_user names the agent that chat turns and the session curator attribute memory
to. The loader requires it of a single-identity deployment, but nothing covered
the two paths between that requirement and the consumers.
local-ollama-standalone.toml set no bot_user and defined no [[identities]], so a
profile AGENTS.md lists as supported could not load at all (archie-core-cx0d).
Give the profile the field, and make the regression guard enumerate
deployments/*.toml through the production loader instead of naming two files, so
a profile added later is covered the moment it is committed. dev.toml is
excluded because it is a development overlay layered over an installed config
rather than a standalone profile, and the exclusion is itself checked so a
renamed overlay is noticed instead of silently widening the rule.
The root BotUser was validated only when no [[identities]] block was present, so
a config with exactly one identity left it empty: the curator then skipped every
session with "no agent id" while the chat turn path ran with the same empty agent
(archie-core-4slp). applyIdentityDefaults now adopts a sole identity as the root
single-identity values -- which is what those fields mean -- and leaves the root
alone when two or more identities leave no single answer. The skip reason now
names bot_user, so the remaining case reads as configuration rather than as a
data problem.
Both regressions were red-first: the enumerated profile test failed on
local-ollama-standalone.toml before the profile was fixed, and the sole-identity
test failed before applyIdentityDefaults adopted it.
VerifyHMAC compared the supplied signature against the computed digest as
case-sensitive hex text, so a sender that emits an uppercase digest failed
verification -- and the failure is indistinguishable from a wrong secret. The
helper is shared by all three inbound surfaces (forge intake, the chat webhook
gateway, capture intake), so one such sender breaks whichever surface it
targets.
Decode both sides to raw bytes and compare those. hex.DecodeString accepts
either case, and comparing digests rather than their text keeps the comparison
constant-time -- strings.EqualFold over the encoded text would not be. A
signature that is not valid hex is rejected outright, and a digest of the
wrong length simply does not match.
archie-core-rl04
docs/architecture is declared authoritative for settled design, so a page that
cites code which has moved actively misleads every session and every subagent
brief that reads it. Nothing in the gate compared a prose citation against the
tree: docsgen checks the contract schema against Go types, docsite checks
generated artifacts against their Markdown sources, prdlint checks PRD writing
style. All three verify internal consistency, so a page can describe a package
deleted months ago and every check stays green -- which is how a page describing
a removed system survives behind a hand-written "removed" banner.
Add tools/docdrift. It resolves every internal/... citation under docs/ against
the tree and fails on one that dangles, handling the shapes prose actually uses:
a package with a symbol (internal/config.Config), a test with its package
(internal/app/archieui/TestFoo), a file-shape template
(internal/webui/api_<concern>.go), and a Go package pattern (internal/...).
Generated artifacts are skipped so embedded page bodies are not double-counted.
The baseline is a burn-down list of the 48 citations already broken -- packages
that moved (internal/store, internal/memory, internal/nats) and ones never built
(internal/policy, the image and research capability docs). It is not a licence:
the check also fails when an allowlisted citation starts resolving again, so an
exemption cannot outlive its reason. Regenerate with `docdrift list`.
Wire it into `task check` as docs:drift.
Also correct AGENTS.md, which listed `policy` among the cross-cutting packages
sitting under internal/. No such package has ever existed in this tree; the
design is approved and unbuilt (docs/architecture/policy.md). That is exactly
the class of stale claim this check now catches.
The adversarial self-review system was removed in 625ead95, but four pages
describing it survived: the architecture page, its design-decision PRD, and the
two superseded calibration/operator PRDs. The architecture page carried a
hand-written "removed, not shipped" banner and was kept only because live PRDs
linked to it, so every reader paid for a system the tree no longer has.
Delete all four and repoint the live referrers at the authority that replaced
them (docs/prds/pr-review-agent.md): inline-review.md's Builds-on line,
pr-review-remediation.md's isolation-contract citation, pr-review-agent.md's
supersede clause, CLAUDE.md's contributor rule, and three Go comments that cited
the deleted paths. Regenerate docs/data/generated/dev-docs.json.
History stays in git; the tree stops describing a system it does not have.
The page drew the same three panels twice: a numbered Capture/Map/Bind
strip and, directly under it, a tab list naming Inspector/Mappings/
Bindings. Both drove the same `?tab=` through the same handler, so the
page read as one wizard drawn twice and named the same three panels with
two different vocabularies in a single view.
The strip survives. It names each step for what the operator does to it
rather than for what the panel holds, and it is the one that reads as a
chain. The step words move to tab-selection.ts as stepsFor(), beside the
rules they belong to; the URL keeps its ids.
Making the strip the only navigation also fixes a latent fault. It
listed all three steps unconditionally, so a composition the server
refuses `mappings` still drew a Map step with no panel behind it, and
clicking it fell back to the first available tab, which did nothing.
stepsFor() returns exactly the tabs this composition can back, and the
page renders an empty state when that is none of them.
ui/dist rebuilt in the same commit: the Go build embeds it.
Gitea reports a review comment position as a uint64. Past the int range the conversion wrapped negative and would reach a reviewer as a line that cannot exist. Refused instead, with a test that fails when the guard is made inert.
Both are standalone programs run by name from one directory, so the package could never build as a unit. The diagnostics skill invokes each file explicitly.
l45's refactor removed the assigned-but-unread daemon handles and l44 had
already moved the guardrail wiring out of the daemon, so the rebase union
left internal/daemon/daemon.go importing internal/tools with no use and
internal/app/archied/bootstrap.go assigning a Guardrails field that no
longer exists. main did not build.
Caught by building the merged tree rather than trusting the merge; the
merge train merged on a failed gate instead of chaining on it, which is
the mistake this commit repairs.
The hazards list still claimed failure classification and retryability are
not represented explicitly. The persisted execution record has carried the
park class the parking code records since the typed-park work landed, so
the hazard now points at that record and the taskstate vocabulary instead
of restating a field list.
Regenerated the committed development-docs artifact for the edited page.
pinTaskProfile parked every pinWorkflowDefinition failure as
taskstate.ParkTransient. That class documents that a requeue can succeed,
but the dominant pin failures are durable: a stored definition whose YAML
does not hash to the digest beside it, a definition that does not parse,
and a workflow or playbook binding resolving to an undefined workflow all
recur on every requeue until an operator repairs the row or the
configuration. A future retry pass reading transient as its input would
loop on them forever.
pinFailure now carries the class its cause needs, decided where the cause
is known, and pinParkClass reads it at the park site. A durable pin defect
parks operator-actionable; only a State Store read or persist failure --
the genuinely environmental case -- stays transient. The safe default for
an unclassified cause is ParkNeedsHuman, never a requeue that will fix it.
Red-first: TestDurablePinDefectIsNotParkedTransient failed at its
assertion before the fix (parked "transient"); TestTransientPinFailureStaysTransient
keeps the environmental case transient so the rule is per-cause, not a
blanket flip.
Three exported Daemon fields were wired by the composition root and read
nowhere: CapabilityHost (*plugin.Host), Curators (*curator.Registry) and
ToolRegistry (*tools.Registry). No field access exists anywhere in the
repo, and git history shows no read ever existed.
Each handle has a live owner outside the daemon: the curator
registry/runtime is boot-owned (the curator isolation invariant keeps it
off the agent loop), the capability host is lifecycle-owned by the
composition root and consumed by the control plane, and the tool registry
is consumed by chat, curator and MCP wiring. Keeping the daemon copies was
decorative wiring, so the fields, their composition assignments and the
now-unused plugin/curator imports go together.
The daemon architecture test now refuses the three names, and the plugin
host contract test refuses a CapabilityHost: handle on the daemon alongside
the PluginRegistry: one it already refused.
TaskContext.Guardrails was never assigned: the engine was built in
archied's composition root and held on Daemon.Guardrails, which no code
read after workflow execution moved to the full-task worker handoff.
archie-agent is a separate process, so a live engine cannot cross that
handoff. Build the engine at the agentworker composition root (the
process that runs agent stages), thread it through the task dependencies,
and set it on TaskContext; drop the now-dead archied-side construction.
Refs: archie-core-jd5v
The remediate round cap runs inside archie-agent and reads
TaskContext.Cfg.MaxRetries, but TaskConfig did not carry the global
Config.MaxRetries: ForTask and ToConfig both dropped it, so a default
configuration reached the cap as 0 and a remediation never parked. Carry
the value (a repo-level override still wins via EffectiveMaxRetries) and
pin it with a red-first cap test traced through ForTask/ToConfig.
Refs: archie-core-ad3p
Commit 4e5b91d7 moved the remediate resume into daemon worktree
preparation and deleted StageResumeWorktree together with the Dir/Resume
pair it called, but nothing in the workflow replaced the binding it did:
TaskContext.Dir and Branch stayed empty for a whole run, so
remediate-build ran the builder with no workspace and
remediate-commit-push called CommitAll/Push with an empty dir and branch.
Extend the workflow-side Trees seam with the prepare target, mirroring
the daemon's mode-aware worktree.Manager.Prepare: PrepareFresh lands on
base, a non-empty target is the branch a resume continues. Remediate now
stages StagePrepareWorktreeOnBranch before any agent stage, binding the
same directory the daemon prepared and the task's PR branch, and failing
closed when the task has no branch rather than preparing base. The
container adapter returns the requested resume target verbatim.
Refs archie-core-h4tk
A task hosts the same configured MCP servers as a chat turn, but the
worker's provider builder passed no sampling handler, so a task-scoped
server's sampling/createMessage request got a JSON-RPC method-not-found
while the identical request succeeded on the chat path. The worker runs
its own model runtime, so it can answer.
Thread a sampling handler built from the task's builder model into the
worker's MCP provider builder, beside the chat path's handler. Build the
task's model runtime once and share it with the stage runners instead of
creating a second client for sampling.
Move the sampling message mapping and max-token bound to agentexec, next
to the runtime both paths call models through, so a server gets the same
bound on either path. Carry the catalog's reasoning flag in
ModelLimits: a reasoning-class builder model must omit the max-token
bound its provider rejects, exactly as the chat path does.
ShippedSoul returned an empty SoulDocument.Legacy, so SoulSuperseded,
replaceSoul and SoulUpgraded had no production producer: the only body the
build ships is its current default, which classifies as SoulCurrent, and only
tests constructed a Legacy document. No earlier SOUL ever shipped (the file was
introduced with the starter in cc83c9ae), so the upgrade path has nothing to
consume.
Remove the speculative machinery and keep the behaviour that is real: seed the
starter when no file exists, recognise the shipped default as current, and
preserve every other body, including a template-shaped edit. A build that
supersedes the starter reintroduces the upgrade together with the old body it
consumes.
ui/src/settings/validation.ts hand-mirrors three control-plane validators with
no shared source, and the model-role rule had already diverged: the dashboard
required a stricter regex while the server only asks for a slash, so it refused
values the server accepts.
Add a shared fixture (internal/app/controlplane/testdata/dashboard-validators.json)
that both sides run through their real implementations: a Go test over the
server validators and ui/test/control-plane-validator-parity.test.ts over the
dashboard ones. Either side changing a rule alone now fails the other's test.
Fix the diverged rule to mirror the server's predicate exactly (non-blank role,
model containing a slash), so an empty or whitespace-padded model is judged the
same way the control plane judges it. Regenerate ui/dist and the dev-docs
artifact.
Telegram had no generic question or choice widget in the agent-turn path,
so the interactive contract could not be carried by the only channel that
ships. telegramInteractor implements ClarifyRequester and PickerRequester
on the shared TextFallback and reports both capabilities honestly: the
capability is about carrying the interaction, not the widget, and the cost
is a typed answer. A reply typed while a prompt is pending is consumed by
the blocked interaction rather than dispatched as a new turn; a command is
never consumed, so /stop still cancels the turn.
The carrier is set on the turn context in the Messaging process. It does
not cross the gRPC boundary into the Gateway process, so in the extracted
messaging deployment the gateway turn has no interactive adapter and
ask_user is not offered -- the same gap that already makes
WithApprovalRequester unreachable there. That transport is a product
decision recorded on the lane, not silently worked around; the in-process
path, the capability report and the tests land here.
Red-first: TestInteractivePickUsesTextFallback and
TestInteractiveClarifyReturnsTypedAnswer (plus the command guard) failed at
the assertion before the interactor was implemented.
prepareTurn now registers an ask_user tool only when the turn context
carries an interactive adapter (WithInteractive), so a contract with no
caller has a real one and a channel that cannot ask registers no tool
rather than one that always fails. A channel reporting Picker gets the
native single-choice request; one reporting only Clarify still carries a
choice, rendered as numbered text and matched from the typed reply through
the domain's FormatPickerText/ParsePickerReply rather than erroring.
Red-first: InteractiveTools returned nothing and
TestInteractiveToolsRegisteredWithCarrier / TestAskUserUsesPickerWhenChannelCanPick
/ TestAskUserFallsBackToTextWhenChannelCannotPick failed at the assertion
before the tool was implemented. TestTurnRegistersAskUserOnlyWithCarrier
proves reachability from a real TurnRunner turn.
The contract could carry a question but nothing carried the ability to ask
one. Add Interactive, resolved from a channel adapter's own capability
report through InteractiveOf, with WithInteractive / InteractiveFromContext
as the per-turn carrier -- the same shape WithApprovalRequester already uses
for consent. The capability still wins over the method set, so a
mis-reporting adapter contributes nothing instead of being called.
Tests: TestInteractiveOfTrustsCapabilityReport and
TestInteractiveCarrierRoundTrip pin the resolution and the round trip.
Flip tool-settings to ApplyMode live (archie-core-zfb0.3): the daemon now
watches the kind, diffs the stored MCP server set against the running
providers -- connecting added servers, disconnecting removed ones and
reconnecting changed ones while an unchanged server keeps running -- and
rebuilds the web_fetch and minimax entries, whose config is captured at
construction. A changed server whose replacement fails to start is rolled
back to the one running, and the refusal is reported through apply status.
toolprovider.Registry grows running-state Add/Remove/Replace beside
Register, Start and Stop, isolating a provider's failure the way the plugin
host's Add/Replace do. The chat turn model resolves its tool-output policy
per turn instead of capturing it at construction, and the boot registration
reads the running holder so a stored update that lands during boot is not
lost.
The PRD still described both approval surfaces requeueing under a hardcoded
implement workflow. The shipped path passes an empty workflow, which Requeue
reads as keep-the-task's, so the feasibility handoff has to name implement on
the task before the wait rather than relying on the handler.
The gate that keeps a PRD-forbidden [models]/[providers] read out of the
Messaging Service only blamed identifiers whose parameter or var type spelled
config.Config. A value reached through an inferred declaration
("cfg := doc.Config") or held in a struct field therefore left the read
intact while the rule saw no holder -- the same class of miss that let voice
transcription ship behind a green link gate.
Widen the holder detection to track the config type through inferred short
variable declarations and vars, struct fields and receivers, type-preserving
expressions, and range variables over a slice or map of config, then assert
each previously-inert shape red first.
The container runtime policies kind was restart-required because the pool
captured image, pull policy, network, max uptime and max concurrency at
construction and the dispatcher fixed its slot count at the start of a drain
pass. Both consumers now re-read the published config:
- the pool's settings come from a live source read per acquire, with the
boot-resolved registry credential and Docker construction values preserved;
a live default-image change is pulled rather than assumed present;
- the daemon owns one long-lived dispatcher that accepts a new limit: running
tasks keep their slots, a raise admits queued work immediately, and a lower
limit is applied as tasks finish;
- the control-plane descriptor is live, the kind joins runtimeResourceKinds,
and the apply/reload paths resize the dispatcher after publishing. The
ContainerConfig fields whose consumers now re-read are added to the reload
allowlist; registry_auth stays restart-required.
Regenerate the docs artifacts. contracts.json also carries the voice
media-type description a prior commit left stale.
The pre-mutation file checkpoint added in e10d862f wrote a full copy of
every write/edit target into .git/archie-checkpoints, but nothing could
restore it: CheckpointStore.RestoreLatest (and its latest/restore
helpers) had no production caller, no rollback surface reaches the
workspace, and the store was never pruned, so it grew without bound in
every workspace.
A writer whose only reader is unreachable is dead weight and an
unbounded disk cost, so the write half goes with the read half: write
and edit no longer snapshot, and CheckpointStore is deleted. The
regression test pins the decision by asserting a write and an edit
leave no .git/archie-checkpoints behind.
archie-core-zfb0.4. Channel settings were restart-required as a whole: a
change to one channel needed a process restart that restarted every channel.
The Messaging Service now reconciles the stored channel-settings resource on
the apply-status restamp interval (docs/prds/plugin-settings-live.md), re-layers
it over the file document exactly as boot does, and restarts only the channel
whose transport settings changed. Every other channel keeps serving.
A restart is stop-and-start, not an in-place reload: each channel gets its own
supervisor and a rebuild factory, so email and webhook -- which have no reload
seam -- are restarted too. Telegram's Start still calls dropPendingUpdates
before it long-polls, so the rule holds on the reconcile path as on /restart. A
replacement is built before the running channel is touched, so a configuration
this build cannot run leaves the running channel serving.
The composed set and the bound listen addresses are process bindings: enabling
or disabling a channel, or changing chat.webhook_addr / chat.email.listen_addr,
is refused and reported for a restart rather than applied. A channel rebuild
that fails is not recorded as applied, so it is retried on the next tick. The
applied version reaches apply status, and ChannelSettingsKind flips to live.
Files: internal/app/archiemessaging/{compose,reconcile,supervise,run}.go,
controlplane ApplyMode, archied runtime watch, configuration.md, the config
skill matrix and the regenerated dev-docs artifact.
Verified: go test ./internal/app/archiemessaging/... (race clean); go test
./cmd/archie-messaging/... ./internal/app/controlplane/... ./internal/app/archied/...
./internal/config/...; go vet and golangci-lint run on those packages (0 issues);
go fix ./... and golangci-lint fmt produced no diff; task docs:artifact:check.
The deletion gate checked which packages the messaging binary links, so a
process that reads a decoded [models]/[providers] value passed while
building an LLM client in-process. Go imports are atomic, but a config
read leaves no import to measure.
- add the model-provider capability packages (transcription, embedding)
to the banned-link table and classify links through a testable
bannedLink rule.
- scan internal/app/archiemessaging's production sources for a read of a
top-level config section the PRD forbids, so the projection that built
the transcriber cannot come back.
- unit-test both rules, including a synthetic copy of the old wiring, so
the live gate cannot rot into a no-op and still pass.
Red first: TestMessagingReadsNoBannedConfigSection failed on cfg.Models
and cfg.Providers before the capability moved, and the link gate failed on
internal/infrastructure/transcription.
The Messaging Service built the voice-transcription client in-process
from [models].transcription and [providers.*], which the messaging
boundary PRD reserves to the process that owns the model runtime and its
provider credentials. The deletion gate only measured linked packages,
so the PRD violation shipped green: config reads are not imports.
Move the capability across the boundary:
- archiemessaging no longer reads [models] or [providers], builds no
transcription client, and drops the ResolvedConfig.Transcriber field.
- telegram classifies a voice note as messaging.MediaTypeVoice and stops
transcribing; it carries the attachment bytes and its note to the turn,
which is all a frontend without the credential can do.
- archied builds the transcriber beside the chat runtime from its own
model-role configuration (setupTranscriber) and gives it to every
gateway TurnRunner.
- the turn runner transcribes a speech attachment before recording the
inbound message, so stored history and the model context carry the
transcript; a nil/failed/empty transcription keeps the frontend note.
- messaging.TranscribedMessageText renders the transcript into the text a
frontend built from its media note, preserving the sender's caption.
Red first: TestTurnRunnerTranscribesSpeechOnTheModelOwningSide failed at
'Transcribe calls = 0, want 1' with the transcription call disabled.
review.precision_gate and review.approve_before_post were file-only, so the
dashboard had no way to write them: no control-plane resource carried them.
Add the review-settings kind (docs/prds/review-settings-resource.md), seed it
from the file's [review] section, layer it field-by-field into cfg.Review,
watch it live, and publish it through ConfigView.Review. The dashboard gets a
Review settings page bound to the kind through PAGE_RESOURCES, showing each
dial beside the value in force.
docs/prds/workflow-step-vocabulary.md named the repository-rules step type
`workflow.diff-rules` while the vocabulary a deployment resolves carries
`gate.diff-rules` (workflow.DiffRulesStepName), so a definition written to
the document's word is refused at save and at run. The same decision's
sibling, docs/prds/runtime-control-plane.md, still claimed "Plugins can add
step types", which this document's closed-set rule contradicts: an
interpreted plugin contributes none, and a step type arrives as a provider
in the compiled-in set.
Correct both documents, and hold the vocabulary PRD to the provider set with
a guard test: every step-type-shaped name the document identifies must
resolve in workflowsteps.Providers(). The test fails on the pre-fix document
("workflow.diff-rules" is contributed by no provider) and passes after.
Refs: archie-core-vwqc, split from archie-core-gcoj (closed as invalidated by
re-verification: the provider set exists and cross-side agreement is already
pinned).
A retry now carries the operator's worktree choice (refresh onto the base
branch or continue the work already pushed on the task branch) from the
dashboard through the task action to the daemon dispatch, and persists it
on the task row so it survives a reload. The daemon resolves the mode from
the task, never from the workflow; BeginRemediation records continue
explicitly so a remediation still resumes its pull request branch.
The control-plane catalog advertises identities, capture-events,
capture-mappings and capture-bindings as domain-managed: the domain API
validates their writes, not the generic resource store. Two of those
paths did not hold.
Identities: the file loader judged an identity name with its own
`name == ""` test, while the store derives the same string through
identity.New, whose rule rejects an empty-after-trim name. A
whitespace-only name passed the file and then failed State Store boot
(or was silently skipped by BootstrapIdentities). The loader now calls
identity.ValidDisplayName, the feature's own rule, and
BootstrapIdentities derives legacy names through
identity.FromLegacyName rather than dropping one it cannot build.
Capture mappings and bindings: mapping.Validate and binding.Validate
ran only in the archie-ui handlers, so any other client of the RPCs the
catalog names could store a mapping or binding the feature refuses.
The staterpc write handlers now apply the feature's rule before the
store, per runtime-control-plane.md ("the server validates the change,
then writes it"). The rule stays in the domain package; the handlers
only translate its refusal.
Capture-events has no file-side copy and no feature rule for a captured
event's content, so there is nothing to unify there.
Tests: identity_agreement_test.go ties the file loader's name rule to
the store constructor; domain_validation_test.go proves the mapping and
binding RPCs refuse an invalid value before it reaches the store.
A remotely-shipped task log entry was re-emitted through the sink with
slog.Logger.LogAttrs, which stamps time.Now(): the entry's own event time
was discarded and replaced with the daemon's receipt time. Because a
container's records arrive in bursts, a multi-minute run collapsed onto a
few milliseconds of receipt timestamps and its timing became
unrecoverable -- which stage ran when, how long an iteration took, whether
a stage stalled.
Write now builds the record from entry.Time (falling back to receipt time
only for an entry that carries none) and dispatches it through the same
handler, preserving the sink's level gate. Receipt time stays available
separately in the record's received_at field, so event time and arrival
time cannot be confused. The agent-side producer already carried the
record's own time; a test now pins that half too.
The OpenAI chat-completions provider in the pinned ai-sdk serialises a
non-zero output-token bound as `max_tokens`, which reasoning-class models
reject with HTTP 400 ("Use 'max_completion_tokens' instead"). Send no bound
at all for a model the catalog marks reasoning; classic models keep their
bound. Covers the chat turn path and MCP sampling, the two call sites that
set one today.
The reasoning flag rides TurnPrepareContext from the catalog details the
gateway already resolves, so archie-core keeps one notion of "reasoning
model": messaging.ModelDetails.Reasoning. A max_completion_tokens path in
ai-sdk is still needed to ever bound these models; that is filed separately.
prepareWorkspace chose between Manager.Prepare (refresh onto base) and a
separate Manager.Resume, and Manager.Resume only opened an
already-prepared clone. A remediation whose local worktree the terminal
cleanup removed, an expired volume dropped, or a different host never had
could therefore never be resumed, and the retry path had no way to select
the mode that continues pushed work.
Unify the two matched methods into Prepare(..., Target): Fresh resets onto
origin/<base>, a non-empty Target resets onto origin/<that branch>, and
either target clones a missing worktree. The daemon's retry path selects
the target from the task row and passes the persisted branch, so a resume
lands on the branch the open PR lives on and fails closed when it is not
on the remote.
Delete the container-mode no-op resume (hybridTrees.Resume and the
resumableTrees capability) now that the daemon owns it. The remediate
workflow no longer stages a resume, and the retired remediate.resume step
word stays resolvable as an inert stage: a stored definition is validated
as a whole collection, so a removed word would fail every workflow to
decode, not just its own.
A Telegram photo or document was dropped between the process that receives
it and the one that runs the turn. Telegram runs in archie-messaging, which
downloads the attachment; the turn runs in archie-gateway/archied, which
never holds the bot token. gatewayrpc stripped MediaAttachment.Data on the
inbound request, so by the time the Gateway's model seam ran, the
attachment had no bytes and no URL, and mediaParts dropped it -- the model
read only the "[photo]" placeholder.
- proto/gateway/v1: Media gains a `data` field, populated only on the
inbound request. Stored-history and outbound-event directions keep it
empty: a persisted record still strips the bytes, and a streamed media
event still carries metadata only.
- gatewayrpc: the inbound conversion maps Data; the stored and outbound
conversions deliberately do not.
- archied: the Gateway server raises its gRPC receive limit from the 4 MB
default to the messaging contract's inbound attachment ceiling plus
framing headroom, so a maximal (20 MB) attachment is accepted rather than
failing the RPC.
- messaging: MaxInboundAttachmentBytes is the single ceiling the Telegram
download gate and the Gateway receive limit both derive from.
Red first: a new TestInboundMediaBytesReachTheTurn asserted the bytes crossed
the wire and failed at that assertion before the mapping changed; it was then
consolidated into TestInboundMediaRoundTrip, which now pins metadata plus bytes.
The Telegram update-report relay verified every pending report against a
nil running-version map, so a successful update always ended with "I still
can't confirm which version is actually running" and read as a failure.
The 2026-09-19 extraction decision left RunningVersions nil because the
Messaging Service could obtain only another binary's stamp. 70ea9b2a
(archie-core-k94o) then gave every host binary, archie-messaging included,
a buildinfo.Version self-report stamped with the archied release tag, so
the process now has a truthful source for its own running version: report
daemon = buildinfo.Version and leave the agent Unverified, since every
archie-agent process is task-scoped and observed only through
daemon.AgentStatus. A relaying process that the update did not replace
still reports its old build, which Verify reads as drift.
The deliver stage's notify() returned early when [notify].webhook was
unset, so a parked feasibility PRD left the process nowhere while both
its doc comments promised an issue comment that was never posted. A
default deployment sets no webhook: the PRD reached only the operator
who went looking.
notify now posts a one-way delivery notice on the task's forge issue
before the webhook, for a forge-backed task. The issue is the channel a
default deployment always has; the webhook remains an additional push.
Neither is a reply channel -- the decision surfaces stay chat and the
Web UI, so the notice carries the PRD and names where to decide rather
than inviting a reply, and no reply cursor is recorded (WatchCommentID
stays 0).
Both stale doc comments now describe what the code does.
docs/prds/plugin-settings-live.md: a `plugin-settings` change now applies
live for plugin_dir, module_dir and secret_engine_dir, and a file dropped
into any of those directories loads on the reconciliation tick.
- PluginSettingsKind moves to ApplyMode "live" and joins
runtimeResourceKinds, so a stored directory change re-layers immediately.
- A reconciler re-runs the directory loads and the layering on the
apply-status restamp interval. Files are content-hashed, so only new and
changed files load.
- plugin.Host grows Add and Replace for the running state (Register keeps
its pre-Start rule), and plugin.LoadFile / secret.Registry.LoadFile are
the single-file load paths the boot loader and the reconciler share.
- Yaegi cannot unload, so a removed file keeps running and the removal is
reported through apply status against the live version until restart; a
clean pass clears it.
- A plugin-settings document that changes skills_dir is refused before the
layering, since skills_dir has no live consumer.
- applystatus.Reporter.AppliedVersion lets the reconciliation report an
outcome without resetting the version to zero.
Add SlashAccessPolicy, a deny-by-default role policy (admin allowlist plus
per-user delegated commands), and enforce it in Router.route before any
local command dispatches. A refusal executes none of the handler, is
visible to the sender, logged, and recorded through an optional
SlashDenials sink.
No config field yet: the gatewayrpc wire drops Message.SenderID (only the
display Sender crosses), so a per-sender allowlist cannot match a Telegram
sender at the daemon Router until the layered auth mixin carries identity
(archie-core-263). Nil policy preserves today's behaviour.
The optional-capability pattern had media and delete but no interactive
UX: a channel could ask a human to approve an action through
ApprovalRequester, but there was no domain contract for posing a
clarifying question or presenting a single-choice picker, and no
capability flag a caller could read before attempting one.
Add ClarifyRequester and PickerRequester to internal/domain/messaging
alongside ApprovalRequester, with Clarify/Picker/Approval flags on
AdapterCapabilities and ClarifierOf/PickerOf/ApproverOf lookups that
treat the capability as the contract rather than the method set, so a
mis-reporting adapter degrades instead of panicking.
TextFallback is the shared text degrade: a channel with no native
question or selection UI still carries the interaction (numbered
prompt, parsed reply) instead of failing or silently dropping it.
FormatClarifyText/FormatPickerText/ParsePickerReply hold the rendering
and matching logic once.
The approval half reuses the existing decision model: Telegram's
telegramApprover already renders a native prompt, so it now reports the
Approval capability and deliberately does not claim Clarify/Picker it
has no native UI for. Gateway re-exports the contract.
Red-first: internal/domain/messaging/interactive_test.go drives the
test double adapters (native, degrade, mis-reporting, over-claiming)
and the text rendering/parsing; telegram/approval_test.go pins the
honest capability report.
The baseline stage treated every red gate as a pre-existing code defect and
dispatched a TDD repair agent. A failure the environment caused -- no Docker
daemon for the test harness, or a gate command that is not installed -- cannot
be fixed from the worktree, so the run spent a full agent budget and then
parked. A provider error during that repair run (observed: HTTP 402) replaced
the gate cause in the park reason entirely.
Classify at the producer: gateEnvironmentCause names a failure whose command
could not start (*exec.Error) or whose output names unavailable host
infrastructure (the Docker shapes from archie-core-71mq). That failure parks
with the cause and the gate output and starts no builder. A real code failure
still dispatches exactly one repair run, and every post-dispatch failure now
carries the gate output alongside the agent/provider error instead of masking
it.
Refs archie-core-rwy6.
A Settings > Runtime page lists every credential binding with the capture
state of its OAuth token set (expiry, scopes, time; never the tokens), and
offers the setup terminal for the Kit profiles the daemon advertises. The
terminal is xterm.js over the WebSocket the harness route upgrades, lazy
loaded so xterm stays out of the shell bundle. The page reports the
terminal as unavailable when the process cannot open one, rather than
offering a control that fails (archie-core-egkf.7).
Wire shapes and URL building live in ui/src/harness/harness.ts and are
covered by ui/test/harness.test.ts; ui/dist is regenerated.
internal/gateway/dashboard_tools.go mirrors the dashboard's route table so
the agent can navigate to every page. The new /settings/harness route needs
its entry or page_index would not offer it (archie-core-egkf.7).
The harness page lists each credential binding with its captured OAuth
state (expiry, scopes, capture time; never the tokens), and the setup
terminal route upgrades to a WebSocket and bridges it to a harness
session. The session is a narrow webui-owned HarnessTerminal seam: the
container, sandbox network and egress path belong to the daemon, so the
dashboard process cannot implement it and answers 503 until a transport
is wired (archie-core-egkf.7). Opening the terminal authorizes as the
update action on the secret, per the PRD.
The per-process apply rows labelled every older applied version "Restart
pending", including a live-apply kind that needs no restart at all: the lag is
in reporting. The wording now follows the resource's apply mode. A live kind
reads "Applied" at the stored version and "Behind" on an older one, neutrally
rather than as a warning, while a restart-required kind keeps "Restart
pending".
The restart banner's condition is lifted out of the component into a plain
module so it can be tested: only a restart-required resource with a process on
an older version earns the banner, and a live-apply kind never does. The
per-process rows are wired onto the Plugins page, where a live kind's lag is
meant to show.
The sandbox kit spec lets one credential@1 declare apiKey and oauth
together, meaning "whichever the host has bound": the published
docker/claude-code-kit does exactly that for anthropic, and codex for
openai. archie decided the kind from the Kit's declaration instead
(egress.IsOAuthManaged), so a dual-declared service always came out
OAuth-bound however the org had bound it:
- kitrun.resolveCredentials granted an API-key binding's service the
empty string, so the proxy had no key to inject and every request to
a domain the Kit named carried an empty credential. The reference
Claude Code Kit could not authenticate with an API key at all.
- an API-key-only service whose binding named no secret resolved to ""
through the zero SecretRef, presenting an empty credential rather than
staying unbound.
- the proxy fired an apiKey inject rule for an OAuth-bound service,
putting "Bearer " on the wire, and intercepted the token endpoint of
an API-key-bound one, whose only outcomes were a 502 on the missing
token set, a capture the org never bound, or -- for a required
dual-declared credential -- a refused launch when no token store was
configured.
- the container's SBX_CRED_*_MODE said "apikey" for an OAuth-bound
dual-declared service, and kitrun demanded a captured OAuth token for
an API-key-bound one whose Kit renders a credential file.
One root cause, fixed once: the org's binding decides the kind. It is
now a first-class fact (egress.CredentialKind: apikey or oauth, absent
meaning unbound), computed from the binding in resolveCredentials and
carried to every consumer of it -- the resolver grant, the container's
credential state (mode variable and credential file), and the proxy
session, whose rule sets are built from it so a rule can only fire for a
service the run carries as that same kind. A service the run does not
carry at all keeps both rule sets, so resolving it still refuses a
required credential and skips an optional one.
Declared and bound stay two independent facts, as the reported
declared-and-granted intersection requires: neither widens the other.
No secret value crosses into kit (Bound carries kinds only) and none is
logged or written to a task row.
A Telegram voice note was stored as the placeholder "[voice message]" and
nothing turned its audio into text, so the agent could not read it. Add a
channel-neutral Transcriber capability to the messaging media layer
(internal/domain/messaging), an ai-sdk Whisper implementation behind it
(internal/infrastructure/transcription), and wire it for Telegram.
The capability is config-driven like the other model roles:
models.transcription names a provider/model, the matching [providers.*]
entry carries the credential (api_key_env or an api_key secret ref), and
a missing role, provider, class or credential degrades to today's
behaviour with a log -- never an error that fails the turn.
A transcribed note replaces its placeholder with "[voice transcription]"
followed by the transcript, preserving any caption, so stored history
shows the agent it is reading a machine transcript.
An EphemeralReply is a status notice a channel delivers and then removes
once its TTL elapses, so a transient placeholder does not linger in the
chat history after it is superseded. The TTL lives on the reply, the
Delete capability joins AdapterCapabilities alongside Media, and
channels.EphemeralSender does the send-then-retract with an injected
clock. A sender that cannot delete still delivers the reply and logs the
missed retraction instead of failing the turn.
Telegram implements MessageDeleter through deleteMessage and honours the
mechanism for the "Archie reloaded." status notice; the pre-restart
"Reloading…" message remains the durable acknowledgement.
ImagePull was called with empty options, so a private registry answered 401
on every pull regardless of containers.pull_policy. docker login did not help
either: it writes ~/.docker/config.json, which only the CLI reads.
Add containers.registry_auth, a SecretRef reusing the credential shape the
rest of the file uses, whose resolved value is a Docker registry.AuthConfig
JSON document. archied resolves it at boot and the pool base64url-encodes it
into the X-Registry-Auth header ImagePullOptions carries.
A missing or unresolvable credential degrades to the anonymous pull that
existed before the field (with a warning), so a deployment with no private
registry is unaffected; a half-named reference is refused by
configuration.Validate. The field is file-owned and json:"-", so the
container-runtime-policies layering has to preserve it explicitly, the way it
preserves Profiles.
MCP servers could not ask the client for a completion: the transports
routed only responses by id and dropped every server-initiated request,
so a server calling sampling/createMessage hung waiting for a reply.
Route server->client requests through the transport readers to a handler
on the client. The client answers sampling/createMessage from a
configured SamplingHandler and maps a missing handler, malformed params
and handler failure to JSON-RPC errors for that request alone -- never a
silent drop or a failed session. stdio and SSE implement the routing;
the stateless HTTP transport cannot receive the request at all and says
so in its doc.
The daemon wires the handler to its own chat runtime and active model
role, so a sample is answered by the model a chat turn uses, capped by
the request's maxTokens and the model's output ceiling, and recorded on
/status like every other model call. No model configured is a refused
request with a clear error.
modelcatalog.Load ran once at boot, so a provider whose credential became
resolvable later, or a model models.dev published since, needed a restart.
The daemon now re-reads the catalog on an interval and republishes everything
derived from it, without a restart.
- `refreshModelCatalog` re-reads through the same options boot used, layers
the result with the process's own runtimeConfig, and publishes. A failed
read keeps the catalog already running: the model list must not go blank
because the catalog service had a bad minute.
- Boot now publishes the merged config into `config.Holder`. applyModelCatalog
only ever wrote into the boot struct, so the catalog's model limits and
discovered providers never reached the running config -- and therefore never
reached `config.ForTask`, which is what a workflow stage resolves model
limits from. The first live update was the first snapshot to carry them.
- The chat model manager's catalog is a contribution that is replaced, not
merged. A model the catalog no longer publishes stops being offered and
described instead of lingering from an earlier snapshot.
- The catalog snapshot and the refs it contributes live behind one lock: the
refresh goroutine replaces them while the config paths read them.
The daemon owns the published configuration, so the loop is the daemon's; the
standalone Gateway reads the catalog once at boot, as it does for the other
live-applied settings it does not watch.
The interval is deliberately not an operator setting: the catalog is derived
state rather than a stored resource, and a knob with no second consumer would
be a setting that parses and does nothing.
A key exported into the shell after the process started stays invisible to
every refresh, and cannot be otherwise: the process environment is fixed at
exec. A credential a secret engine starts resolving is visible, because the
catalog's credential lookup is the secrets registry.
Refs archie-core-zfb0.6
Descriptor.Validate duplicated only the forge-permission half of
Authority.Validate, so a descriptor could declare a blank credential
service, egress host, trigger or tool and be installed: the acceptance
record refused the same blank, leaving the descriptor the operator is
shown disagreeing with the record the package is bounded by. Delegate to
Authority.Validate, the one validation of a grant list, and cover it with
the blank cases the descriptor now has to refuse.
The built-in workspace write and edit tools replaced file content with
no recoverable pre-state. Each now snapshots its target immediately
before the write and refuses the mutation when the snapshot cannot be
taken, so a checkpoint is never silently skipped.
Checkpoints land in .git/archie-checkpoints inside the workspace, the
same per-task state directory that already holds the task brief and the
prepared sentinel: nothing under .git can be swept onto the task branch
by go-git's Add{All:true}. A checkpoint records either the file's bytes
or its absence, so creating a file restores by removing it;
RestoreLatest returns the most recent pre-state for a path.
Shell, Go-script, MCP and plugin tools are deliberately not covered:
the set of files they can touch is not enumerable from the call.
A declared output is written through a capture tool, but the dispatch-time
harness check read only the workflow's needs.captures. A workflow that
declared outputs without also writing needs: {captures: true} could name a
Kit profile whose adapter serves no capture tools; a required output then
parked with "output %q is required" instead of the profile being refused.
WorkflowInterface.Needs now reports captures for a non-empty Outputs beside
the declared needs, and the profile check and Kit launcher read it. The
needs: block keeps its meaning for a workflow that captures without
declaring outputs.
- internal/domain/workflow/task: Needs() derives captures; DeclaredNeeds
carries only the declared block.
- internal/daemon: pinTaskProfile and runKitTask read Needs().
- tests: parse-time derivation, and pinTaskProfile refusing an
outputs-declaring workflow against a Kit adapter with no capture MCP.
The Settings save flow tracked dirty fields but did not consult validity:
each page validated in a local computed the save bar could not see, so an
invalid draft could be saved and the server refused it a round-trip later.
The rules now live once in ui/src/settings/validation.ts, the store derives
invalidFields from the same draft diff as dirtyKinds, and the save bar lists
the invalid fields and refuses Save. The route-leave guard still reads the
one dirty model, so the two can never disagree.
Every edited field also shows its former value inline ("was 1m0s") from the
same per-kind diff, via a new DraftHint component.
The per-kind diff is now a cached computed, so the hint, the save bar and
the guard share one computation per change instead of one per consumer.
The poller, the forge webhook intake and the review scan built envelopes
without an Org, so every task and reaction keyed on the default org no
matter which org its identity served. Resolve the org through the State
Store's PrincipalSource (the existing org RPC over the staterpc client)
on the single publish paths:
- PublishTask stamps the envelope's identity org before encoding, so the
idempotency key is org/identity/owner/repo/number; a resolve failure
stops the publish instead of keying under a guess.
- PublishReaction is the one reaction write path, stamping the root org
when the webhook producer could not; the poll scan stamps its task's
already-resolved org, so both deliveries of one review key the same.
- The webhook receiver's inline publish closure moves onto the daemon
method, removing the second reaction write path.
Review of the plugin-settings reconcile PRD (F1-F8) returned REVISE: the doc
stated outcomes without making the decisions behind them. This revision makes
each one, so the PRD can carry the plugin live-reload work:
- ApplyMode is set to live and the gateway's version lag moves from the
restart banner to the per-process applied-version rows.
- The skills_dir refusal gets a check site (a pre-layer comparison on the live
path, not the value-agnostic validator), keeping #1143's validates-nothing
intact.
- Records the four-directory coupling and why a whole-document refusal is
acceptable.
- Justifies stop-then-start as a module's only check, and adds the refused
dependent-replace outcome to the apply-status taxonomy.
- States that a reconcile tick re-runs layering and provider resolution, and
what archie-gateway actually boots.
- Adds the Verification section.
Cited package paths re-checked against the tree; the control-plane
definitions now cite internal/app/controlplane/.
The temp-repo fixtures in agentexec, domain/workflow and agentworker seeded
a repository and committed without disabling gpg signing, so a host with
commit.gpgsign=true and an agent-only SSH signing key failed those tests at
the fixture's own git call ("Couldn't get agent socket?").
Each producer now writes commit.gpgsign=false into the temporary repository's
own config, which also covers commits made inside the seeded repo by a
subprocess (the fake harness). A regression test per package pins the
fixture's hermeticity under a hostile global git config.
The server offers re-review for a waiting task, and it refuses one
without instructions, so the control needs a dialog of its own rather
than the plain confirm: it collects the operator's focus and posts
api.taskAction(id, "rereview", {instructions}). taskAction now takes the
review-gate payload (instructions and the finding keys approve posts, an
absent selection meaning all), and the freeze-dried catalog gains
Re-review so the first render matches the served catalog. The rereview
event kinds join the live-update topic list.
ui/dist is regenerated and committed; task test:ui and the typecheck pass.
Decision 1 of docs/prds/pr-review-operator-response.md: the dashboard's
POST /api/tasks/{id}/action is the authoritative surface, chat's /approve
is a shortcut that posts every offered finding, and both reach the same
Service.Apply so one operator intent cannot be recorded as two decisions.
The action body now carries instructions (required by rereview) and the
finding keys an approve posts. taskactions.Service answers an offer
through the guarded RespondReviewGate write: approve records the
selection on the offer, rereview records the instructions, increments the
round and clears the offer, and a rereview with no instructions, with no
offer, or at the cap is refused as a conflict with nothing written. Chat
reaches the same service: chatTaskControllerAdapter.ApproveChatTask
delegates to b.taskActions() instead of its own requeue, which is what
removed the handler's hardcoded implement handoff -- feasibility's deliver
stage now names implement on the task before it waits, the invariant the
handler needs.
The payload crosses every hop it must: the NATS action request, the
gateway.v1 gRPC contract (regenerated), the LocalChatAdapter, and the
webui handler, which answers 400 for a rereview without instructions and
409 for the cap. A rereview event kind names its actor the way the
approval and rejection trios do.
taskactions.Task gains review_gate and rereview_rounds, and the two
surfaces' tests assert they agree.
The gate now writes its offer to the task's review_gate document before it
waits -- the scored findings, the head SHA, the pull request's identity
and the resuming workflow -- because the engine cannot resume a run
partway, so a resumed pipeline recomputes its findings and only the
recorded document is the review the operator saw
(docs/prds/pr-review-operator-response.md, "The review the operator
answers").
The document lives with the task column it encodes (internal/domain/
workflow/task), the way EncodeInputs does, and carries each finding as
opaque JSON beside the key an operator's selection names. That is what
lets the dashboard render and answer a gate without linking the workflow
engine -- cmd/archie-ui/architecture_test.go measures the linked binary,
and an operator-domain service importing the finding's own type linked
prreview into archie-ui. prreview owns the key derivation and the
finding's encoding, and the MaxRereviewRounds constant lives in the task
vocabulary beside the action names it answers with.
Intake restores the document into the run: a re-review's instructions
ride one labelled block in runLens's and runReviewer's missions only, and
an approve's recorded review is posted by phase 9 filtered by the
operator's selection, with the recomputed findings kept out of the output.
The gate does not wait again on an answered approve.
taskstate gains the rereview action the vocabulary needs -- offered for
waiting_human beside approve and reject, routed to queued -- whose
surfaces follow in the response channel.
The operator-approval gate needs its conversation with the operator
persisted before it waits and its answer threaded back
(docs/prds/pr-review-operator-response.md, Decision 2). review_gate is a
text column beside review_payload, encoded by the package that owns the
type; rereview_rounds is a bigint counted only by the new guarded write.
RespondReviewGate is the one write beside RetryTask/BeginRemediation: a
transition-table guard, one from-status check, an optional round
increment, and a requeue in one transaction. The re-review cap is
enforced in the row under the guard's lock, and a refusal leaves the
task waiting and the row untouched, surfaced as ErrRereviewCapReached
(added to the wire error table and the conformance battery). The column
joins the column-listing ListTaskSummaries projection and UpdateTask, so
the dashboard reads the offer and the store round-trips the count.
prReviewDecisionStages loses the withOperatorApproval flag: the shared
list the implement workflow splices (archie-core-afbk.7) never carries
the gate, and the standalone pipeline inserts it itself, immediately
before its merge gate (docs/prds/pr-review-operator-response.md, "The
gate is not reachable from archie's own PRs"). A structural test pins
both directions so a future edit cannot re-share the gate.
A workflow declares named, typed outputs beside its inputs
(task.WorkflowInterface.Outputs). A run writes each one once through a
capture tool named after the output, or from a deterministic Go stage via
TaskContext.WriteOutput; the finish write persists them on tasks.outputs
before the outcome transition. A wait:true caller receives its successful
callee's outputs through WorkflowCallStatus and publishes one as its own
through a call step's outputs assignment.
Build authority: docs/prds/workflow-call-outputs.md.
- save time: WorkflowInterface.Validate checks output names and types;
checkCallOutputs checks a call's assignment against both declarations
and refuses outputs over a wait:false call.
- run time: undeclared, mistyped and required-but-missing values park the
run; published callee values are re-checked against the caller's type.
- storage/wire: tasks.outputs (goose 0024), reset by each claim so the set
is attempt-scoped; an encoded set past the structured-payload bound is
refused, not clipped. Task.outputs_json and
WorkflowCallStatusResponse.outputs_json carry it; task.Caller keeps its
two methods.
- examples: firewall-contain calls firewall-investigate and publishes its
summary as its own output.
Four findings from the ui-redesign verification pass, each with the module that
owns the rule and the test that pins it.
- events: the three-step strip's and the tab chips' counts move out of the SFC
into events/counts.ts -- one read per step, an unreadable count stays blank
rather than reading as zero (events-counts.test.ts).
- workflows: workflows/workflow-yaml.ts reads the editor's YAML with a real
parser (the yaml package, not a line scanner) to drive the read-only Steps
preview and a live validity indicator; the editor gains a line-number gutter
and light syntax colouring behind the textarea. Step types and their settings
are not served to the dashboard, so those remain the server's to check on
save, and a save it refuses still reports its own reason.
- tasks: an ERROR log row is a block rather than only red text (lib/log.ts), the
log pane ends with "End of attempt N - M lines", and the task head offers
Archive when the server's own action list offers it (task-actions.ts, and
TaskRowActions' new `only` narrows the list without inventing a control).
- dashboard: the live activity feed gains the All/Tasks/System filter
(activity-filter.ts) and every quality-gate row gains a pass bar
(pass-bar.ts) that is red when the gate is failing.
ui/dist regenerated; ui/package.json carries yaml ^2.9.1.
Direction for GH #1154 (epic #998): reconcile the plugin, module and
secret-engine directories into the running registries, load new and
changed files, and surface only the removals through apply status.
Draft pending maintainer approval - not settled design, so no diff.
The index page warned that task check adds linter-tool lines to go.sum
(bead 1e37) and told contributors to restore the file before committing.
Measured at HEAD 275d3370 on a copy of go.sum, with the originals restored
after every step, that is not what the gate does: go fix ./..., golangci-lint
fmt, go vet ./..., golangci-lint run ./... (root and tools), go build ./cmd/...,
go test -short ./..., the docsgen and docsite checks and
go -C tools test -mod=readonly ./... left go.mod, go.sum, tools/go.mod and
tools/go.sum byte-identical, with GOFLAGS unset and again with
GOFLAGS=-mod=mod. golangci-lint cannot write its own lines into go.sum either:
it is in no require or tool directive, go mod tidy -diff is empty, and the
committed go.sum carries none of its dependencies.
What the page should say is the rule the measurements show. A stale go.mod or
go.sum fails the gate (missing go.sum entry, updates to go.mod needed) instead
of being repaired, because every Go step runs under the toolchain's readonly
default and the tools steps pass -mod=readonly. Only a global
GOFLAGS=-mod=mod in go env re-enables the repair, which is why the flag is
spelled out on the go -C tools steps; when go.sum does go dirty, go mod tidy
and its own commit are the fix.
The regenerated docs/data/generated/dev-docs.json rides along, as the page
requires: docsite check failed on the edited page first (stale dev-docs.json)
and passes after task docs:artifact.
No process writes configuration through the dashboard: the write
handlers, their UpdateConfig/ResetConfig/UpdateRepoField seams and
ConfigView.Editable were deleted with the runtime config overlay
(295f8d69), and database-backed settings are written through the control
plane. That left producer-side residue behind:
- ConfigField.Editable and the descriptor literals setting it, which
emitted editable=true for fields no process can change, and which
ui/src/settings/types.ts's ConfigField deliberately omits from the
reader side of the wire shape
- ErrConfigUpdateUnavailable/ErrConfigUpdateInvalid, with neither a
producer nor a consumer since handleConfigUpdate was deleted
- comments pointing at handleConfigUpdate/UpdateConfig,
ConfigView.Editable, the overlay's overridden markers and a deleted
test name
The two Editable-only descriptor tests go with the field; the deleted
write path is what they pinned.
Closes the decision #1143 asked for. plugin_dir, module_dir, secret_engine_dir
and skills_dir keep their no-op validator, and the comment at that validator
now says so on purpose, with the two rules considered and refused:
- "must exist": all four consumers read a missing directory as an empty one by
design (plugin.LoadDir and secret.Registry.LoadDir return no entries and no
error on os.IsNotExist, loadModules skips an absent kind file, playbook.Load
returns an empty store, and internal/secret's TestLoadDirNonexistent pins the
no-error half), so the rule would turn deliberate emptiness into a failed
startup.
- "must be absolute" / "skills_dir under plugin_dir": no directory setting in
the repository is validated for shape, so a rule for these four alone is
arbitrary, and a boot-path validator over a stored document fails closed on
values the store already holds.
Deliberately no code change to either layer: configuration.validateDatabaseOwned
still has no say over the four, and the resource validator stays the single
no-op function with one obvious home for a rule.
Refs #1143
applyGeneralDefaults home-expanded secret_engine_dir, work_dir, state_dir and
chat.workspace but not plugin_dir, module_dir or skills_dir, while
config.example.toml tells operators to write all four as
~/.local/share/archie/<dir>. A literal "~" is not a directory: plugin.LoadDir
returns an empty set for it, loadModules finds no kind file, and skill
discovery falls back to the built-ins, all without an error naming the
mistake. Expand the three in the same place as the rest, so a value the
example advertises resolves to the directory the operator meant.
Test first: TestLoadExpandsConfiguredHomePaths gains the three fields (and
pins HOME to a temp dir instead of the runner's real one); it failed on the
three new assertions before this change.
No validator is added alongside: see the plugin-settings decision record for
why these four directories stay free-form.
Refs #1143
The sd_notify(3) client lived in internal/app/archied, so archie-messaging --
a process that must not import archied's composition -- could never announce
itself to systemd, and could therefore never be a Type=notify unit
(archie-core-g5g8).
The protocol client and the heartbeat sampler move to internal/sdnotify, a
cross-cutting leaf that imports nothing of ours. What stays in archied is
what is the daemon's own: which marker counts as progress (daemon.LastPollAt)
and how long the run loop may go between poll passes. The three entry points
that already announced keep announcing, unchanged.
The Messaging Service announces READY=1 at the point it declares itself
serving, the way the daemon, the Gateway and the State Store already do. No
unit is switched to Type=notify here: that is a separate decision, and
archie-messaging.service is still Type=simple.
The skill already told a lane that a wire-type change needs `task docs:generate`;
this names the other trigger for the same generated artifact. Adding or editing a
page under docs/ gains or drops a page in docs/data/generated/dev-docs.json, and
skipping the regeneration fails docs:artifact:check on main rather than in the
lane that caused it.
fcc6a797 added docs/prds/soul.md but did not regenerate
docs/data/generated/dev-docs.json, which is generated from the docs tree and
gained a 95th page (/dev/prds/soul/). main therefore fails the gate's
docs:artifact:check. Regenerated with the command the check itself names.
The fleet skill is normative for archie facts and the fleet can read it, so
three facts earned this session move here from one operator's private memory:
- Peer sessions over intercom: name the reporting channel in the brief, because
a compaction erases an agent's transport convention while keeping its task
state, so a peer can revert to addressing its operator. Peer silence is not
evidence of death; ask for an ack. Also: match task shape to window size, and
checkpoint at ~70% rather than compacting mid-task.
- Gate the merge candidate before main moves, and have the lane brief demand
scoped lint beside scoped tests.
- codegraph: read interface_dispatch and inferred tests alongside test_count,
treat the index as a derived cache, stagger name-based queries, and report
problems as one JSON object per line.
An install that stayed in installed_packages left every contribution
unprojected: nothing made a package's workflow a usable org resource, and
nothing stopped it on removal. This lands projection for the workflow family,
the one kind whose org resource, validation and live read path all exist:
- storepkg.Service gains Projections (family -> projector): install resolves
each projected family's contributed names against the fetched
layer (FilesFromLayer), applies them, and on failure withdraws and removes
the half installation; remove withdraws before the record goes, so a failed
withdrawal keeps the package installed and usable.
- controlplane.WorkflowProjector merges the package's entries into the org's
workflow-definitions document — the same document the daemon's
WorkflowDefinitions client reads per dispatch, so a projected workflow is
usable at the next dispatch and a withdrawn one stops dispatching, without
restarts. A contributed id displacing an operator's own workflow is refused
(storepkg.ErrContributionCollision), never silently replaced.
- installed_package_contributions (migration 0023) records the entries a
package projected, so removal takes exactly its own contributions out.
- stateStoreDeps wires the projector set on the State Store's pool; the
composition is pinned by the live round-trip test over a real gRPC
connection.
Prompts, skills, MCP server definitions and default settings remain
unprojected: their contribution formats are not settled by docs/prds/store.md
and are left for their own slices rather than half-wired here.
{{.Scopes}} now substitutes the captured set as an ARRAY in the target
encoding, so a one-element set stays a one-element array rather than
collapsing to a bare string. An empty set REFUSES by name with an
actionable "re-run the setup terminal" message: the spec declares an
omission case for {{.PrimaryApiKey}} but none for {{.Scopes}}, and an empty
array would silently change the CLI's capability decisions.
{{.PrimaryApiKey}} now implements the spec's omit case: its enclosing key is
dropped from the structure, never emptied. archie resolves a service key
only to fill the egress grant and the container holds egress.Sentinel, so
there is never a key to render.
The renderer's input becomes OAuthFacts{Scopes, ExpiresAt} -- still the only
thing it receives about a stored token set, so a real access or refresh
token cannot reach the file and an unsourceable placeholder still refuses by
name (docs/prds/external-agent-harness.md, Verification).
A Kit's credentialFile cannot render {{.Scopes}} because nothing records the
granted scopes: the token response's `scope` field (RFC 6749 section 5.1,
space-delimited) was never read, and the token set had nowhere to hold it.
capture now parses `scope` into []string and keeps the previous set when the
field is absent or empty -- the same rule the refresh token follows, so a
refresh that does not repeat the scopes preserves what the login captured.
The set is carried end to end: Scopes on harnesssecret.Secret, in
harnessSecretPayload (JSON inside the existing encrypted envelope, so no
migration), on message HarnessSecret as `repeated string scopes = 8`, and
both ways through staterpc values.go. The proto field is load-bearing: the
daemon reads the token set over gRPC, so a local-struct-only field is
silently lost in production -- TestHarnessSecretConformance proves the round
trip in both its local and grpc modes.
An archie package declares its authority; nothing in the tree recorded the
operator's acceptance of it. This lands the acceptance-record slice of
docs/prds/store.md ("Authority"):
- storepkg.Authority gains Covers (the upper-bound predicate: equal or
narrower applies, wider does not) and Validate (forge-permission
vocabulary, no blank grants).
- Installed carries AcceptedAuthority (nil until accepted); install leaves it
unset, so an unaccepted package has no authority.
- AcceptPackageAuthority on the storepkg Manager records the acceptance
against the pinned digest and refuses grants the package does not declare
(storepkg.ErrAuthorityNotDeclared), carried over the wire.
- staterpc gains the admin-only AcceptPackageAuthority RPC;
InstalledPackage carries accepted_authority.
A Kit's credential@1 oauth.credentialFile was never rendered: Assemble set
SBX_CRED_<SVC>_MODE=oauth but no file was written, so the harness CLI started
logged out and never reached the token endpoint the egress proxy intercepts.
Render it at launch, for each bound OAuth-managed service that declares one:
the Kit's structure with its access/refresh sentinels, and the stored token
set's expiry for {{.ExpiresAt}}. The renderer's only input about a token set
is that expiry -- the tokens never cross into kit, so a real token cannot be
written (docs/prds/external-agent-harness.md, Verification).
Expiry renders as epoch milliseconds, the unit both in-spec OAuth credential
files use (Claude Code's expiresAt, OpenCode's expires). A placeholder archie
does not render, or a token placeholder with no declared sentinel, refuses the
launch rather than leaving a literal or an empty value in the file.
kitrun reads the store only for a service the run credential carries, and
fails closed when a rendered credential file has no captured token set.
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.
containedctx rejects a struct field of type context.Context, and both new
table tests stored one. Each case now carries what the caller put on the
context -- a builder in the org test, the org id in the client test -- and
builds the context inside the subtest.
The storage and wire contract already key resources by (org, kind), but no
caller sent an org, so every request acted in the default org. The org now
travels on the request context: webui's authorize middleware attaches the
verified principal's org, and one request-constructor per wire shape
(controlplanerpc's Query/History/Watch/CommandRequest) stamps it back, so a
call site cannot send the wrong org and a new one cannot forget it.
No behaviour change today: the shared token's principal is the default org's
owner, no production path creates another org, and a context with no principal
yields DefaultOrgID (what the server already derived from an empty org_id).
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 b5c98a0c (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 295f8d69 (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.
docs/architecture/adversarial-review.md opened by describing the stage as
shipped and documented workflow.Reviewer, ReviewRequest, ReviewReport and
StageReview -- all of which 625ead95 deleted with the adversarial self-review
system. Three PRDs link to the page, so deleting it would break those links.
It gets a banner instead: the removal commit, the authority that supersedes it
(docs/prds/pr-review-agent.md says so in its own header), and the one section
that is stale in an older way -- the synchronous review_pr, which
archie-core-afbk.14 replaced with a queued pr-review task.
Regenerates docs/data/generated/dev-docs.json, which is built from these
sources.
A message's attachments persist as metadata (messaging.Message.Media) and
cross the gateway wire, but the dashboard transcript rendered text only, so
a photo was invisible to the operator while the model had seen it.
The transcript view now carries the persisted metadata, and the browser
labels each attachment in the placeholder vocabulary the channels already
write into a message's text ('[photo]', '[document: report.pdf]'), with the
surviving metadata (mime, name, size, dimensions, duration) in the chip's
tooltip.
Bytes are never rendered: they are turn-scoped and stripped before a record
is stored, so there is nothing to fetch and no broken image or 404 link. The
platform file id is deliberately not served either -- it is a download
handle, not an address -- so the chip links out only when the attachment
itself carried a URL. A message with no attachments omits the media key, so
transcripts written before this change keep the payload they had.
prepareWorkspace always called worktree.Manager.Prepare, whose refresh
resets an existing clone onto origin/<base>. A remediation task -- one
continuing an archie-owned PR branch -- therefore lost that branch's
commits before its container started: StageResumeWorktree runs inside the
container against a tree already reset to base, and hybridTrees.Resume is
a no-op, so nothing restored origin/<branch>.
Route a task whose row names the remediate workflow through
Manager.Resume on the persisted Task.Branch, before Acquire. The branch is
read from the task row, never recomputed from the title or labels, and a
missing branch fails closed with a park rather than falling back to base.
Regression tests use a real bare remote: the prepared worktree's HEAD must
be the PR branch tip, a missing branch must park without touching the
worktree, and a non-remediation task must still start from base.
An empty org or kind, or either containing the '/' that joins them in the
audit record key, fails on read and write instead of colliding or reading as
an absent resource.
resources and resource_history are one document per org and kind, with
per-org advisory locks, request-ID idempotency and audit keys. The
control-plane Query/History/Command/Watch requests carry org_id; a request
naming none acts in the default org until the caller's org is derived
server-side.
The tar.gz extraction already refused ".." escapes, but it did so with
filepath.Rel and checked the resulting relative path. CodeQL's go/zipslip
query models a sanitizer only as strings.HasPrefix applied to the value that
reaches the file-system sink, so the derived relative-path check was invisible
to it and it flagged os.MkdirAll/os.WriteFile on the joined target
(alert 17: internal/infrastructure/prsource/archive.go).
Resolve destDir to an absolute path once, reject an absolute entry name
outright, then test the joined target against the destination root with
strings.HasPrefix -- the PrefixCheck guard the query recognises. Behaviour is
unchanged: a ".." entry is still refused, and a wrapper directory is still
stripped. Adds an absolute-entry rejection test and a test proving an escaping
entry writes nothing outside destDir.
Telegram dropped every incoming photo, document, video and audio
message: the default handler required message text, and nothing on the
turn path knew media existed. The receiving path now closes the gap
end to end.
- telegram: extract the attachment from the update (largest photo, plus
document, video, video-note, audio and voice kinds), download its
bytes on the turn lane through getFile + the Bot API file link with a
20 MB gate, submit the turn with the attachment, and answer
unsupported content kinds (sticker, location, contact, poll) with a
clear notice instead of silence
- messaging: Inbound carries turn-scoped transport media and
MediaAttachment a Data field for in-process bytes; Message gains
Media attachment metadata which stores persist (Postgres jsonb via
migration 0020, memory store) with Data stripped at the persist
boundary, and pb.Message carries the metadata on the gateway wire
- gateway: TurnModelRequest threads the turn's media to the model seam
- archied: the chat turn model merges the attachments into the final
user message as ai-sdk image/file part entries, so vision-capable
models see the file for the turn it arrived in; stored history keeps
the placeholder note plus caption
Session log: messages carry what was sent as data (the attachment
metadata), not just prose. Transcript rendering of attachments and a
re-look capability are tracked as archie-core-jaba.
A workflow-enablement control-plane resource lists, per org, the workflows
that org has disabled. A binding targeting a disabled workflow is skipped at
dispatch like an unarmed one, is refused on save, and is flagged on the
binding list; the workflows page toggles it. Bindings now carry the org_id
column they already had in storage, over the State Store wire too.
Org-owned workflow definitions are deferred to a follow-up bead: they need
the caller's org, which the access chain resolves.
DecodeResult accepted any value reflect could convert, so a number for a
string field silently became the rune string (42 became "*"), and a declared
field absent from the map read as its zero value. Both are now reported: a
value is accepted only at the field's declared type, and every declared field
must be present.
That is the boundary the typed CEL environment promises, and it is live now
that the action runner decodes every result into actions.<id>.result before a
later expression reads it. D5 in docs/prds/multi-action-playbooks.md records
the rule.
An args value that cannot be evaluated aborts its playbook run: the action and
every later action in that playbook do not run, other playbooks matching the
event still run, and the task is unaffected. J3's skip-and-continue rule stays
specific to `when`, because a predicate has a meaningful false and data does
not.
Ratified now that the action runner is the production consumer, and locked by a
call-site test that fails if the rule is weakened to a skip. Drop the stale
"unbuilt decisions" header line, since J1, J2 and the Result schema
declarations have shipped.
A seed was consulted only for a resource kind the store did not hold, so a
document that changed in the build never reached a database an earlier
release had seeded. For workflow-definitions that is not a stale setting but
a total outage: the collection validates as one document, so a stored step
type this build no longer has fails every task's pin, whatever workflow the
task names. The seed's request ID was stable per kind and the store answers a
known request ID from resource_history, which outlives the resource, so the
documented recovery -- remove the resource and restart -- wrote nothing
either.
Seeds now carry one identity the reader can name, and a kind the store holds
is refreshed only when the seed itself wrote the newest revision: a
file-derived value stays the store's, and an operator's replacement is never
undone. The request ID is derived from the value, so an idempotent replay is
still one revision without making a second, changed document impossible. A
replay whose resource is gone re-creates it from the ledger's revision.
The shipped-vs-file-derived distinction is the seed's to make, so it is a
property of the definition (Defaults is set exactly for the kinds that ship a
document) rather than a check at each consumer.
Approving a waiting_human task requeues it under implement, but the requeue
only writes status, workflow and park_reason: the previous run's definition
stays pinned. pinWorkflowDefinition then returned early on any non-empty
stored definition, having checked only that the YAML matched its own recorded
digest -- a property of the write, never of the task -- so the dispatch went
out carrying a definition naming feasibility over a row naming implement.
That is the pair the worker's compile refuses
(agentworker.CompilePinnedWorkflow: "pinned workflow definition does not match
task identity"), so the task parked again immediately, identically on every
further approval, leaving decline the only working operator action.
A pin's identity is part of what makes it valid, not an assumption. The
producer now reads the id the stored definition declares (workflow.DefinitionID
answers that from YAML alone, without the step vocabulary) and re-pins from the
active collection whenever it disagrees with the task's workflow column. A pin
that is present, digest-valid and id-consistent is still a strict no-op, so an
operator's active definition override survives a dispatch unchanged, and a pin
whose YAML does not match its recorded digest is still refused rather than
silently overwritten.
Closes#1235
review_pr self-omitted since 625ead95 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.
stagePRIntake's new missing-PR-number error (d0d759d2) fired even when
this stage runs embedded inside StagePRReviewAndOpenPR (archie's own
PRs, Task.Workflow == "implement"), where no PR exists yet and
localPRSource deliberately ignores the number. Scope the error to the
standalone pr-review workflow, which always needs a real, externally-
fetchable pull request.
Caught before this reached main: the existing StagePRReviewAndOpenPR
tests substitute a fake decision-stage list (by design, so they don't
have to script all nine phases' agent calls), so they never exercised
the real stagePRIntake and would not have caught this. Added a test
that calls stagePRIntake directly with Workflow: "implement" and no
PR number, which does.
Watched-repos needs no bespoke webhook-parsing code: the existing
generic capture+binding system (internal/infrastructure/captureintake,
internal/domain/binding.Binding) already turns any inbound webhook into
a task on any workflow, via a dashboard-editable matcher, CEL filter
and payload-to-input mapping. pr-review just needed to become a
binding-targetable workflow.
- Workflow gains an Interface field (task.WorkflowInterface) so a
Go-literal builtin can declare inputs the same way a YAML-defined one
does; ShippedDefinitions emits an inputs: block only when non-empty,
so every other builtin's generated YAML is byte-identical to before.
- PRReview() declares pr_number as a required number input.
- Task gains EffectivePRNumber(): PRNumber when a producer set it
directly (archie's own PRs), else the pr_number input a binding
assigned generically through Task.Inputs. Handles json.Number (the
store's round-trip encoding), float64 and int.
- The daemon resolves it once in acquireTaskContainer, before the task
brief is written and before the pr-review prefetch runs, so
everything downstream agrees. stagePRIntake falls back to the same
resolution for any dispatch path that bypasses container acquisition,
and fails loudly if neither PRNumber nor the input is set.
An operator wires up watched-repos entirely through the dashboard: a
Binding matching the webhook's source, a CEL filter for pull_request
events, workflow: pr-review, and an Inputs mapping pr_number from the
payload. No code change needed for a new repo or a new source.
Operator/chat trigger remains open, left as a precise continuation:
EnqueueChatTask is part of the State Store's protobuf-generated gRPC
contract (proto/state/v1/state.proto), not just a Go interface --
extending it for a generic inputs parameter needs a proto field
addition + regen, a new SQL query (StampTaskBinding cannot be reused,
since it unconditionally stamps binding_id/version, which a plain chat
task must never carry), and updates across staterpc's client/server and
~20 call sites. Real plumbing, not a quick tool rewrite -- scoped
correctly as its own pass rather than rushed here.
Adds the mechanism pr-review's watched-repos and operator triggers need:
before acquiring a pr-review task's container, the daemon fetches the pull
request's metadata, diff and head snapshot over its own credentialed forge
client (prefetchPRReview, using the already-built HTTP-based prsource.Source
from f7c64616) and writes the result under workDir/.archie-pr-review -- the
same host directory Docker bind-mounts into the container. The container-side
pipeline reads it back with prsource.MountSource, a local filesystem read, no
network call and no credential.
This follows the existing convention exactly (docs/development/agent.md,
"Giving the agent something new": "the daemon's own administrative token
never enters a container") and the same pattern WriteTaskJSON already uses
for the task brief -- prepare on the host before the container starts,
because the container binds the directory. No RPC service, no environment
variable, no exception to the stated rule.
The pipeline's Stage.Run bodies execute inside the sandboxed archie-agent
process, which holds neither a forge credential nor a git-level one --
confirmed the egress/CredentialCapability mechanism (grants.go,
credentials.go) only wires into the Kit/harness launch path
(kitrun.Launcher), not the built-in runner pr-review actually uses, so
routing through it as previously planned isn't viable without a much
bigger structural change. The git-shell Trees dependency needed a local
clone and a git-level credential the sandbox likely doesn't have even with
a bare API token.
Adds two narrow forge capabilities (PullRequestDiffReader,
RepoArchiveReader) implemented on both backends:
- GitHub: PullRequests.GetRaw for the diff, Repositories.GetArchiveLink
plus a manual unauthenticated fetch of the resolved (pre-signed,
non-API) blob URL for the archive.
- Gitea: GetPullRequestDiff and GetArchiveReader directly (no separate
fetch needed).
PRSource.Snapshot fetches the archive and extracts it with a new
extractTarGz, which strips the wrapper directory both forges add (whether
represented as a bare-name path prefix or an explicit tar directory
header), refuses any entry that would escape destDir, and drops .git
entries per the Isolation contract.
Real bug caught before commit: the wrapper-stripping heuristic initially
treated a lone top-level file the same as a top-level directory header,
silently discarding the file entirely when no wrapper existed. Caught by
TestExtractTarGzWithNoWrapperDirectory before it shipped.
Not wired into any trigger yet -- watched-repositories and the operator
trigger still need this Source constructed and handed to the pr-review
task's TaskContext, which is where an execution-model decision (daemon-side
vs sandboxed) has to land first. Left as a precise continuation on
archie-core-afbk.7, not guessed past.
StagePRReviewAndOpenPR runs the pr-review pipeline's decision phases
(1-8) against the task's own uncommitted change, using a new
localPRSource that reads Diff/Snapshot straight from Trees instead of
fetching an external PR -- there is no PR number yet to fetch one by,
which is why this trigger needed its own PRSource rather than the
forge-backed one afbk.7 already built for external PRs.
An unchallenged blocking finding parks the task with the findings
instead of opening a PR; a pipeline stage failure parks it the same
way any stage failure does. Once the PR opens, advisory findings post
against it -- best-effort, matching the deleted StagePostReviewComments'
convention: a posting failure is logged, not reverted into the outcome
the PR's existence already earned.
Implement() now uses this in place of the plain StageOpenPR. Bootstrap
and TDD are untouched -- the PRD names "the implement workflow"
specifically; extending to the others is a separate call.
Resolves this bead's first blocker (confirmed via read: CompilePinnedWorkflow
returns the same workflow.Workflow type and runs through the same
workflow.Run either compilation path, so a stage setting Outcome ends
the run identically regardless -- stagePROutput's posting logic had to
move inside StageOpenPR's own Run body, not follow it as a separate
Stage, which OpenPR's own doc comment already anticipated).
Still open on this bead: watched-repositories and operator triggers,
both blocked on the credential path for PRSource's real forge-backed
implementation reaching the sandboxed archie-agent process -- see the
bead comment for the concrete design (egress credential-capability
grant, narrow forge diff/archive HTTP methods) not yet built.
docs/prds/pr-review-agent.md's own header already declared this
superseded (docs/architecture/adversarial-review.md, docs/prds/
operator-pr-review.md, docs/prds/review-calibration.md); this executes
that removal per the maintainer's explicit decision, so no reference
to the old path remains:
- internal/domain/workflow/review.go, review_findings.go,
review_report_md.go and their tests: Reviewer, ReviewRequest,
StageReview, StagePostReviewComments, ReviewReport/ReviewFinding and
friends. ReviewComment relocated into workflow.go (still used by
Forger.CreateReviewComments and the new pr-review pipeline).
- internal/app/agentworker/review.go: the ai-sdk-backed subagentReviewer.
- internal/app/archied/pr_review.go: the synchronous operator-review
path (prReviewer, gateway.ChatPRReviewer wiring). The review_pr chat
tool now self-omits (nil reviewer) until the operator trigger is
rebuilt to enqueue an async pr-review task instead of reviewing
synchronously in the chat turn.
- config.Repo.ReviewEnabled and its dashboard exposure.
- Two composition-order tests and one dashboard test that existed only
to pin the deleted path.
Also splits PRReview()'s Stage list into prReviewDecisionStages()
(phases 1-8) and stagePROutput() (phase 9), so a future caller can
splice the decision phases before a PR exists and defer posting until
after -- needed for the "archie's own PRs" trigger, not wired here: it
needs the same stage-loop-around-StageOpenPR semantics this pass
couldn't fully verify in the time available (does an Outcome-setting
stage like StageOpenPR end the compiled-workflow-definition engine the
same way it ends workflow.Run's literal loop?). Carries ScoredFinding.
Adversary through synthesis so that trigger's blocking-finding check
doesn't need to cross-reference back into the pre-synthesis slice.
Not built in this pass, left as a precise continuation (see the bead
comment): the watched-repositories and operator triggers, both blocked
on the same real question -- how a forge-reading credential reaches
PRSource's real implementation when the pr-review pipeline's Stage.Run
bodies execute inside the sandboxed archie-agent process, which holds
none today.
Metadata/Diff/Snapshot implemented against a narrow Forge (GetPullRequest)
and Trees (CheckoutPR/Diff/Snapshot) contract, satisfying
workflow.PRSource -- the counterpart to the task's own Trees, which never
reaches an arbitrary external PR. worktree.Manager already satisfies the
narrow Trees interface structurally; forge.PullRequestReader needs a
small field-mapping adapter at the composition root (not yet wired --
see the afbk.7 continuation note).
Deliberately not wired into production task execution this pass: doing
so surfaced a real credential-boundary problem (see bead comment) that
needs resolving first, not papering over.
Add review.precision_gate and review.approve_before_post to config,
threaded through TaskConfig/ForTask/ToConfig so the pr-review workflow
reads them under archie-agent too, not just in-process.
stagePRPrecisionGate runs between review and verification, filtering
findings down to concrete, evidenced defects when the dial is on;
stagePROperatorApproval ends the run in waiting_human right after
synthesis, before the merge gate, when approval is required and
findings exist. Both are off by default and fail open on a broken
agent call, matching the pipeline's existing recall-first fallbacks.
Filed follow-ups: afbk.11 for the actual operator-response resume
mechanics (post/reject/re-review with instructions, the 2-round cap --
genuinely needs either a small Task schema addition or a documented
Notes-encoding decision, a call for whoever wires afbk.7's triggers)
and afbk.12 for exposing the two flags in the dashboard Config tab.
Phase 8 (merge gate) runs one classification call per finding, deciding
blocking vs advisory per the PRD's narrow criteria; a failed or malformed
call leaves the finding advisory. Added between synthesis and output.
A run-level token/wall-clock budget, split into cumulative per-phase
shares (prreview.Budget.PhaseExhausted), gates the expensive agent-call
work in lenses, review, verification, coverage-consistency, merge-gate,
and the anatomy narrative / output polish sub-calls -- deterministic
bookkeeping (snapshot, blast radius, clustering, scoring) always runs
regardless. A skipped phase is recorded and named in the posted review's
outcome, alongside the REQUEST_CHANGES/COMMENT event ReviewEventFor
already decided.
Known gaps left for a follow-up: workflow.Forger.CreateReviewComments
always posts a COMMENT-state review (GitHub's implementation submits
per-comment calls, not a review object, so REQUEST_CHANGES needs a
Forger/forge change), and there is no PR-body fallback list for
whole-file findings (docs/prds/inline-review.md).
Adds phases 5 and 6 of docs/prds/pr-review-agent.md between the existing
review and synthesis stages: an evidence verifier that drops unsupported
high-priority findings, an adversary that confirms/challenges findings and
may report new ones (more sceptical for a likely machine-written PR), a
per-cluster compound-defect check, a coverage gate that runs gap reviewers
for uncovered clusters and high-exposure blast-radius files (capped at 2
rounds), and consistency verification for cross-location obligations. The
coverage gate and consistency verification run in parallel per the PRD,
guarded by prReviewState.findingsMu.
Phases 5/6 are afbk.4's scope; the merge gate (phase 8) remains afbk.5's.
Extends the afbk.1 deterministic core for afbk.4's coverage gate and
compound-defect check: exposure fan-in counts and high-exposure filtering
(blast.go), cluster/finding coverage matching and grouping (coverage.go),
and a high-priority severity predicate the evidence verifier gates on
(scoring.go).
Adds PRSource (metadata/diff/snapshot, mirroring Trees for an external PR
rather than the task's own worktree) and the pr-review workflow: intake,
anatomy, lenses, review, synthesis and output as Stages recording
StepExecution children, built on the deterministic core from afbk.1/.2.
Phase 4's reviewer fan-out records a distinct StepFailed for a reviewer
that exhausted its turn cap or deadline before its terminal tool call,
separate from StepSucceeded for one that completed and found nothing
(the just-landed PRD refinement); phases 3, 4 and 9 fan out through a
bounded semaphore since tc.RunAgentChild already supports concurrent
StepExecution recording from inside one stage body.
Phases 5, 6 and 8 (verification, coverage/consistency, merge gate) are
out of scope -- afbk.4 and afbk.5. Output posts every line-anchored
finding as advisory forge review comments; the blocking/advisory split
needs the merge gate first.
First slice of archie-core-afbk.3's pr-review pipeline (phases 1 and 3's
deterministic logic): depth classification from changed-line count with the
operator-override rule, the depth-to-dimension-cap table, cross-lens
dimension merge/dedup/cap, and the hallucination-check dimension added for a
likely-machine-written PR.
Table-driven tests cover the classification boundaries, the override rule,
duplicate-name merging, priority-ordered capping and the AI-generated
threshold. Stage wiring (agent calls, StepExecution recording, the fan-out
concurrency phases 3/4/9 need, and a PR diff/snapshot source) is still open;
see the bead for what remains.
Landing three PRD refinements found while studying prior reviewer art before
starting archie-core-afbk.3: dimension selection now sees intake's
machine-written score directly and adds a hallucination-check dimension for
it; a reviewer that exhausts its turn cap or deadline records a distinct
StepExecution status from one that completed and found nothing; phase 9
polish runs in a bounded pool of 8, matching phase 4.
Clears the five open CodeQL alerts. harnessCredential parsed uid and gid
as 32-bit and os.Chown converted them to int, which wraps on a 32-bit
build; they are now parsed to 31 bits, so an out-of-range id is refused
where it is read. mergeMapping sized its map by len(base)+len(override);
it now hints len(base) and lets the map grow.
agent-context@1 was listed as supported, but a Kit's contributed guidance
never reached the agent. At container create archie now writes the
workload's profile file (CLAUDE.md, AGENTS.md, ...) beside the workspace
with a Kits index: a staged body is pointed at where the image holds it,
an inline one gets its own file the index points at. The profile never
inlines a Kit's text. The files are written as root, so a run can read
but not change them, and are rewritten on every create.
The workspace moves to /archie/workspace so the profile sits in a real
parent directory rather than /, which some CLIs stop short of when they
look upward for instruction files.
Part of archie-core-egkf.6.
A Kit's agent-skills@1 path now gets the shared skills store
(skills_dir/.agents/skills) bind-mounted read-only, whatever mode the Kit
asks for; with no skills_dir the host withholds the mount. skills_dir is
read live on every launch. skill.StoreDir exposes the store path so the
launcher does not copy the package's directory constant.
Part of archie-core-egkf.6.
kitrun ran the first Kit of a profile's list as the container image, so
every mixin's layers (its tools, skills and staged context) were dropped
without a refusal. A profile's `kit` is now one digest-pinned reference:
a workload Kit, or a published Kit set, which the Kit spec's frontend
merges from a workload and its mixins into one image. archie composes no
Kits itself, and a bare mixin is refused with a pointer to publishing a
set. kit.Compose had no production caller left and is removed.
BREAKING CHANGE: `[containers.profiles.X] kit` and the agent-profiles
document's `kit` are a string, not a list. A stored list fails to decode
and must be rewritten as the one workload or set reference.
Part of archie-core-egkf.6.
The egress proxy now holds a Kit's OAuth tokens on the host. A refresh
carrying the sentinel refresh token goes upstream with the org's stored
one; a successful response is written to the State Store and returned to
the container with sentinels only. Requests to the Kit's resource hosts
carrying the sentinel access token get the stored one.
The org's token set is read or written only for a run whose credential
carries the service, so a Kit declaring a service never reaches the org
secret by itself. The launcher grants a bound OAuth service without a
config secret, and Register refuses a required OAuth credential when no
harness secret store is wired. A provider that does not rotate refresh
tokens keeps the stored one.
Part of archie-core-egkf.7 (#1208). Credential-file rendering and
per-binding concurrency remain.
A worktree terminal cleanup keeps (uncaptured or unreadable work) now has a
reap path: archiving calls Daemon.RemoveWorktree for the owning identity's
trees, and the keep logs name archive as the way out. The no-change cleanup
test reports completed through one direct transition instead of reaching
merged via a faked pr_open hop.
qdbo.8 follow-ups: ActionTarget names each action's destination status, the
taskactions service records through it, and a test proves every offered action
is a legal transition. worktreeHoldsUncapturedWork now keeps a worktree on any
stat error other than not-exist. The dashboard action test covers completed, and
agent-system.md drops the no-state-machine hazard qdbo.5 resolved.
Recover the OAuth storage slice from f6079e9d and the missing workflow persistence error handling from f07c314e, adapted to the current step contract. Require encryption for OAuth token storage and verify RPC round trips and task-grant denial.
Plan item 4 of docs/prds/execution-tree-state-machine.md (archie-core-1216),
plus the callee half of CancelExecution that plan item 5 deferred until the
tree could decide it.
Every agent call a stage makes records itself: AgentStage's bridge, the
baseline-fix auto-fix run, the adversarial reviewer and a workflow.call each
start a child StepExecution of kind agent or call under the stage's own step
-- TaskContext.StepID, which the engine sets before the stage body starts and
clears when it returns -- and finish it with the call's own outcome and the
tokens it accounted. A child's recording write failure parks the execution
the same way a stage's does: an agent call that ran unrecorded is the
invisibility the step table exists to end. A stage invoked outside the
engine's recorded run -- the stage unit tests -- records no child and runs
unchanged.
The call step is what makes the callee half of the PRD's Cancellation section
decidable, and this lands it: a call step closes when its callee ends, so an
open call step is a callee the caller waits on (wait:true) and a closed one
is a wait:false callee that runs on. CancelExecution reads the open call
steps before its sweep closes them and cancels each named callee through its
own CancelExecution in the caller's write's aftermath -- the callee's own
steps, its own events, its own move to the same destination, and the callee's
own wait:true callees beyond it, the depth the enqueue enforces bounding the
recursion. A callee that cannot be cancelled is reported and the caller's own
record stands.
StartStep refuses a call step whose callee is not this run's own (the
callee's call_parent_task_id must name the recording execution): a
compromised container could otherwise record a step naming a foreign
execution and cancel it. StartStepRequest gains called_execution_id (field 6;
non-breaking, the column and its named consumer already exist) and
StepStart carries it.
PRD decisions recorded here:
- The reviewer records as one agent child named "review": the Reviewer
contract runs one subagent per review, the PRD model's review:1/review:2
are illustrative of depth-1 children. A completed report closes it
succeeded, a not-run review failed with the skip reason; the contract
carries no usage, so tokens are 0.
- A failed-callee call step closes as failed with the callee's detail when
the wait ends otherwise; the single open case is the caller itself being
cancelled, whose CancelExecution already swept this step -- a late write
must not pretend the wait is still the caller's business.
- A call step's callee is cancelled to the same destination the caller's
action named (parked stays parked, closed_wont_do ends the whole chain),
and a callee that cannot be cancelled is reported while the caller's own
record stands either way.
- The agent child's detail is the result summary on success and the error's
text on failure, with the call's own TokensUsed -- the PRD's only usage
field, untracked per call for the reviewer contract.
The task-list table and NeedsYouCard read a task.stage field the API
stopped emitting once tasks.stage dropped; remove the column and the
fallback rather than let it render an empty cell forever.
stateStoreDeps grew a fourth optional-capability branch (StepReader,
alongside Pi's ExecutionCanceller and the RecoverStale rebase) and
tripped golangci-lint's cyclop gate; split the execution-tree surfaces
into executionDeps, mirroring the existing accessDeps split.
docs/prds/execution-tree-state-machine.md: step_executions (0017) is now the
durable per-step record; the dashboard's run detail (GET /api/tasks/{id}/
attempts) still folded stage_start/stage_finish events into a rail by hand,
and tasks.stage duplicated what StartStep/FinishStep already record properly.
Added the missing read:
- ListSteps(execution_id, attempt) -- attempt 0 lists every attempt of the
execution, oldest first, so the rail renders every attempt from one call.
New storecontract.StepReader (separate from StepRecorder: this is a
dashboard/API/dispatch action per the PRD's wire contract, never
task-scoped-grant callable), postgresdb.ListStepExecutions, staterpc
client/server/values.go plumbing, wired through state_store.go's Deps and
archieui/compose.go's Server.Steps the same optional-capability pattern
every other dashboard read uses.
- internal/webui/api_tasks_attempts.go: stageViewsFromSteps replaces
foldStages/finishStage/stageOutcome. Attempt bounds, event_count and which
attempt numbers exist stay sourced from events (an attempt can carry
events -- agent calls -- with no step), only the stage list itself moves.
The wire JSON contract is unchanged, so no frontend change was needed;
`task ui` confirms ui/dist still matches a fresh build.
- A running step past the task's own current attempt reads interrupted, not
running: RecoverStale (archie-core, still open per #1214) is what corrects
a crashed run's stale "running" row, and until it does this is the honest
read rather than trusting a row that may be stale.
Dropped tasks.stage and every reader, no fallback:
- Migration 0018 drops the column; tasks.sql's INSERT/UPDATE/RETURNING lists
and the sqlc-generated code no longer carry it.
- workflow.Task.Stage is gone; workflow.Run's in-flight "which stage is this"
bookkeeping moves to TaskContext.Stage (execution-time only, never
persisted -- park/finish's event tagging is its only reader).
- pb.Task.stage (wire field 10) is `[deprecated = true]`, not deleted (never
reuse a field number); staterpc's taskProto/taskValue no longer map it.
- taskactions.Task.Stage and the retry event's "previous_stage" data field
are gone: the operator-action package had no reader for the column beyond
echoing it.
- The chat /tasks command's per-task "workflow/stage" display drops to
workflow-only (ChatTaskSummary.Stage removed, workflowStage() deleted):
it was a genuine reader with no replacement in scope for this change.
Read the archie-web-ui skill and the state-store/daemon docs/development
pages first, per instruction. Stayed out of cancel/stop code throughout
(Pi's concurrent CancelExecution work); the only shared files touched
(workflow.go, daemon-adjacent SQL) got the smallest possible diff.
Plan item 6 of docs/prds/execution-tree-state-machine.md (archie-core-1214),
the crash-recovery sweep the step table made decidable. RecoverStale used to be
one bare UPDATE of tasks running -> queued; the steps an interrupted execution
left running stayed running forever, so the next attempt started under steps
that were never closed.
Recovery is now one transaction: the running executions are locked, every step
each one's current attempt left running moves to the step transition table's
interrupted outcome with one stage_finish event row carrying the
interruption marker -- the same document stageOutcome reads, so the attempt
view renders the interruption the way the pre-step-table producer wrote it --
each execution's audit row lands in the same write, and the existing
running->queued requeue query runs last inside it. Both edges are pinned in
SQL and pinned to their tables (the execution pair beside claim and
BeginRemediation, the step pair in its own test, because the two tables are
different tables), so a query edit cannot move a write off a table.
Deliberately running-only, per the PRD's letter: pending rows never persist
outside StartStep's own transaction, so a crashed attempt leaves only running
rows, and a finished step is never rewritten. The interrupted steps' events
render as the PRD's interrupted -- distinct from cancelled, which an operator
or parent asked for, and from failed, which the step reported.
The wait:true-callee and agent-child sweeps ride #1216's tree, and the
dashboard's ListSteps read is plan item 7; both untouched here, and the
RecoverStale signature and RPC are unchanged.
Plan item 5 of docs/prds/execution-tree-state-machine.md (archie-core-1217).
Until now a stop was a context cancel plus a caller-side transition, and the
step rows a worker still held running could never be told: the execution moved
while the work carried on, and the old interrupt-first ordering existed only
because the record could not defend itself. The step table can: the PRD's
ordering -- the store is the record, the context cancel is the delivery --
became safe the moment a worker's next step write fails ErrStaleTransition
against a cancelled step.
- storecontract.ExecutionCanceller and the CancelExecution RPC: one
transaction moves every non-terminal StepExecution of the execution's
current attempt to cancelled (one event row each, in the same
transaction), and the execution itself to the status the operator action
names, under the shared transition table with its audit row. Staleness is
decided before legality, the way guardTransition decides it. Earlier
attempts are never rewritten. Deliberately administrative: the
deny-by-default grant rule covers it, pinned by a test.
- taskactions.Service routes stop, cancel, abandon and reject through it and
the old Transition/CancelTask combinations are deleted; the daemon's
in-memory cancel is demoted to the delivery hook the PRD names, called
after the store record.
- The gateway's chat controller records first and delivers second, the same
order, and records even when no runtime is wired here (a standalone
gateway cannot reach the daemon's goroutines): the record is what unsticks
a lost-cancel task, and the delivery is best effort. StopRunning and
TaskRuntime.CancelRunningTasks are deleted outright -- no production
caller remained once the task_action tool owned stopping, and the daemon's
CancelRunningTasks/runningTasks.stopAll go with them.
- The gateway's chat adapter writes through CancelExecution instead of a
bare Transition, so chat /cancel and the dashboard's action service land
on the same path.
PRD decisions recorded here:
- Each cancelled step's event row is stage_finish with {cancelled: true} and
the reason as its detail -- the exact-one-event-per-step-transition rule
covers the pending -> cancelled transition too, even for a step that never
ran.
- A parked cancel carries the needs_human class, matching the Transition
path this replaces; the transient class stays with parkRunningTask's
unwind parks, which now meet ErrStaleTransition for cancelled runs and are
ignored there.
- Cancelling a wait:true callee is deferred to #1216's agent-call children:
the callee's own tree and the wait flag are what make
"cancelling a caller cancels each callee it waits on" decidable, and the
callee writes it cannot fake are this issue's half of the contract.
- RecoverStale's interrupted sweep is plan item 6, untouched here.
docs/prds/external-agent-harness.md (Credentials) and orgs-and-access.md:
egress.Resolver had no production implementation, and no run carried a
credential naming the org secrets its identity is granted, so a Kit's
required credential@1 was refused at the proxy and no harness run
authenticated (archie-core-egkf.11).
Two things, as scoped (this does not attempt #1026's full run-credential
consolidation replacing WorktreeGrantIssuer/StateStoreGrantIssuer -- that
PRD item is real, separate, and still open; this is deliberately narrower):
1. A run credential naming granted secrets: config.CredentialBinding maps a
Kit credential@1 service to a secret; config.Config/IdentityConfig gain
Org and GrantedCredentials (a per-identity allowlist of service names,
reusing the existing per-identity config-override pattern DiffCapLines
already uses, not a new Cedar/Authorizer integration -- KindSecret policy
objects exist in internal/domain/access but assembling a full Principal
is #1026's job, not a two-line addition here). config.ContainerConfig.
BoundCredentials computes the declared (Kit) ∩ granted (identity) ∩
org-matched intersection Sam's own rule requires: neither side widens
the other, proven by a mutation-checked test flipping each of the three
independently.
2. egress.GrantResolver: the production Resolver, holding only what a
caller explicitly Grant-ed one run, replaced wholesale (not merged) on
a repeated Grant, gone entirely on RevokeGrant. kitrun.Launcher.Launch
computes the intersection per launch and resolves real values through
the existing secret registry (SecretResolver), Grants it before the
proxy session opens, and Release/error-path rollback (a new shared
Launcher.release) always revokes it.
Course-corrected mid-implementation (flagged by Sam): credential bindings
first landed as a boot-time config.ContainerConfig.Credentials field
captured once into Launcher.Bindings -- exactly the "parses but is not a
resource" trap CLAUDE.md warns about, and inconsistent with agent-profiles
(#1207) making a Kit profile apply without a restart. Rebuilt as its own
live control-plane resource, CredentialBindingsKind ("credential-bindings"),
following the agent-profiles/container-runtime-policies split precisely:
config.ContainerConfig.Credentials is json:"-", [containers].credentials
is only its seed, and kitrun.Launcher now holds *config.Holder (not a
captured slice) and reads Containers.Credentials fresh on every Launch.
Org/GrantedCredentials were already read fresh per dispatch (d.configFor
inside runKitTask, never cached), so no equivalent fix was needed there.
Deliberately not built: identities and grants as their own State Store
resource (orgs-and-access.md's "Org owns ... identities and their grants").
Identities are entirely config.toml-defined today with no control-plane
resource at all; moving GrantedCredentials alone into one would put half
an identity in two places. That migration is identities' own scope, not
credential bindings'.
Plan item 3 of docs/prds/execution-tree-state-machine.md (archie-core-1220), on
top of the transition tables and ErrIllegalTransition enforcement (1214/1215,
archie-core-qdbo.5):
- Migration 0017 adds step_executions -- id, org_id, workspace_id, execution_id,
attempt, parent_id, depth, kind, name, called_execution_id, status, detail,
tokens_used, started_at, finished_at, indexed on (execution_id, attempt, id).
Ownership fields are stamped from the execution's row; depth is derived from
the parent, never supplied by a caller. Existing rows gain no backfilled
steps.
- task.Store (the workflow engine's mid-run facade) gains StartStep/FinishStep
(5 methods, within the 8 cap), with storecontract.StepRecorder fronting them
on the server; deadlineStore wraps both with its per-call timeout.
- The store enforces each write as one transaction: the guarded row write
under the shared step transition table plus the transition's own
stage_start/stage_finish event row. Staleness is decided before legality,
the way guardTransition decides it, and the store returns the persisted
event for the caller's post-commit publish -- the EmitDurable convention
(the daemon's event sink skips already-persisted rows by assigned ID), which
is why workflow.Run stops emitting stage events beside the store and no
longer discards step-write errors: a failed start or finish parks the
execution, and the stage does not run unrecorded. An interrupted stage
records interrupted rather than failed; a recording failure on that
shutdown path is logged and left to RecoverStale, which owns the
interrupted-execution sweep in plan item 6.
- The run credential of docs/prds/orgs-and-access.md authorises StartStep and
FinishStep on its own execution only: both requests carry the execution ID
the grant check verifies (FinishStep carries it because the interceptor
never reads the database), and FinishStep verifies handler-side that the
step really is that execution's. authorizesTaskScopedCall's sanctioned
widenings are now held as a lookup table so the next one stops growing a
switch.
- The PRD's wire contract is StartStep(execution, attempt, parent, kind, name)
-> step id; the responses also carry the persisted event (needed for the
post-commit publish) and FinishStep's request carries execution_id (needed
for the grant check) -- both noted here as deliberate additions to the PRD's
shorthand. called_execution_id exists in the table but not yet on the wire:
its named consumer is the workflow-call recording of plan item 4 (#1216).
Conformance drives both adapters; grant tests pin the own-execution scoping;
the wire sentinel set gains ErrInvalidStep (InvalidArgument, "step execution
invalid") for a step kind no consumer names.
docs/prds/external-agent-harness.md ("Contract"): workflow definition
validation must reject a stage whose needs the selected harness cannot
meet -- capture tools without an adapter, or a gate retry without a
resume verb. The step vocabulary had no static way to declare either.
Added task.WorkflowInterface.Needs{Captures, GateRetries}, parsed and
validated (GateRetries >= 0) the same way Inputs/Repository already are.
Only a Kit profile is checked against it: an image profile's built-in
agent loop always supports both, so Needs constrains only the harness path.
Two enforcement points, chosen for where each fact is actually known
without a network fetch at save time:
- Captures vs adapter is knowable from config alone (profile.Adapter, the
agentexec.harnessAdapters table), so daemon.pinTaskProfile checks it
right where it already resolves the profile (validateProfileMeetsNeeds),
parking the task the same way an unconfigured profile already does.
- GateRetries vs the Kit's actual agent-sessions resume verb is only known
once the Kit composition is fetched, which kitrun.Launcher.Launch
already does -- so kit.ValidateNeeds runs there (new kitrun.Request.
GateRetries field, threaded from the workflow's parsed Needs in
daemon.runKitTask) rather than inventing an image-fetching workflow-save
validator.
Deliberately NOT built: "a Kit profile named by no workflow is a
validation error" (external-agent-harness.md "Selection"). Read literally
("a Kit profile [that is] named by no workflow"), this is a
cross-resource check -- an agent-profiles entry unreferenced by anything
in workflow-definitions -- and no control-plane Definition validator can
see another resource today (Definition.Validate is a pure []byte->error
function by design, matching every existing resource kind). Building
that crossing is a real, separate piece of infrastructure with its own
ordering questions (does defining a Kit profile before its workflow now
fail?), not a two-line addition, so it is left for a follow-on rather
than bolted on here.
Also fixes a test bug caught by rerunning with a short -timeout per
instruction: TestRunKitTaskThreadsGateRetriesToTheLauncher's fake NATS
subscriber never responded, so runKitTask's call into runViaAgent blocked
forever waiting for a reply bounded by a zero (unconfigured) wall-clock
budget. Fixed by responding, matching the sibling test's pattern.
docs/prds/external-agent-harness.md's "Selection" says a stage may name a
different profile than its workflow's. Investigated before writing new
runtime code, per instruction not to build container-switching machinery:
a Kit task runs in one container provisioned for one profile (Container
layout), so a stage needing a different profile cannot be a mid-container
runner swap without inventing per-stage re-provisioning the PRD does not
ask for and Container layout argues against ("cost scales with the run,
not with how many agents it fans out to").
The requirement is already met by workflow.call plus per-task profile
resolution, both pre-existing: postgres.Store.StartCall stores the
callee's OWN Workflow name (not the caller's), and daemon.pinTaskProfile
resolves a task's profile purely from its own WorkflowDefinitionYAML.
Chaining these means a stage wanting a different profile is its own
callee workflow, started via workflow.call, exactly the way
event-automation.md already describes ("the callee runs as its own run
with its own agent profile").
No new production code, only a PRD clarification (dev-docs regenerated)
plus TestWorkflowCallGivesACalleeItsOwnProfile (daemon_test.go), which
closes the gap between two already-tested facts that nothing previously
stated together: TestWorkflowCallerConformance (staterpc) proves a
callee's Workflow field is independent of its caller's; this proves that
independence is what makes Kit-vs-image runner selection independent too,
composing a caller pinned to an image profile with a real StartCall-
created callee pinned to a Kit profile.
docs/prds/external-agent-harness.md ("Selection"): a Kit profile is an org
resource that applies without a restart. Profiles were bundled inside
container-runtime-policies (ApplyMode: restart-required), which is correct
for Image/MaxConcurrency/Network but not for Profiles, which nothing
startup-builds: daemon.configFor reads config.Holder fresh per dispatch
(pinTaskProfile -> Containers.Profile).
Split Profiles into its own resource, AgentProfileKind ("agent-profiles"),
ApplyMode: live, seeded from [containers.profiles] and validated with the
same rules the file document uses (config.ValidateAgentProfiles, factored
out of ContainerConfig.ValidateProfiles so the two cannot disagree).
config.ContainerConfig.Profiles is now json:"-" so container-runtime-policies
never carries it (one authoritative resource per field, not two), and
runtime_config.go layers the new resource in by wholesale map replacement
(matching ModelRoleAssignmentsKind's precedent) rather than merging into the
file's map. Added Profiles to reload.go's Containers reloadable-subfield set
to match this.
Deliberately NOT built here: true per-org multi-tenant storage for this
resource (docs/prds/orgs-and-access.md places agent profiles under org
ownership, granted to workspaces). No existing control-plane resource kind
in this registry does real per-org storage yet either -- schedules,
workflow settings, etc. are all single instance-wide documents -- so
agent-profiles follows that same established, tested pattern rather than
inventing org-scoped storage unilaterally for this one resource. Org/
workspace grants over agent-profiles are a follow-on, not a redo: nothing
about this resource's shape needs to change to add that scoping later.
Router.Route returned the chat-facing rate-limit prose with a nil error, so
the webhook handler had no way to tell a genuine dispatch outcome from a
rejection: DeliverTo "origin" echoed the prose as a 200 reply, and any
other route got a 202 for an event that was actually dropped before
reaching the LLM, so the source never retries it.
ChatReply now carries RateLimited, set by a new Router.RouteResult (Route
is now a thin wrapper over it) so chat channels that render Text to a
human are unaffected. The webhook handler checks it and answers 429,
matching the precedent internal/webhookguard.RateLimiter's other callers
already set.
applyWorkflowExecutionSettings swapped the running config with cfgHolder.Set,
so the dashboard's published projection kept the previous budgets until the
next reload. Route it through publishConfig like every other config change.
Fixes#1148
The bypass mux mounted captureintake's route from a local literal that
duplicated captureintake.Path, with a comment acknowledging the drift risk:
the kind of duplication that silently stops matching after a rename
(archie-core-1175). Reference the constant instead, so the receiver owns the
one spelling of the route and a rename there cannot unmount here.
The existing routing tests are the drift coverage: TestCaptureIntakeMountedOnBypassMux
drives Handler() with a POST to the real path, so a rename on either side that
stopped matching would fail it; no new test is needed. This gives internal/webui
its first infrastructure import -- the deleted literal existed so webui could
mount an http.Handler without depending on the receiver's concrete package, but
mounting by the owner's constant is exactly the boundary the intake cutover
drew: webui mounts and reads, captureintake owns the write path.
2fcc32d8 gave archied sd_notify: one READY=1 when the run loop starts serving.
RunGateway and RunStateStore serve contracts and health surfaces of their own --
the State Store even takes -ready-addr for a readiness HTTP listener -- but told
systemd nothing, so run as Type=notify either would hang until TimeoutStartSec
and be killed in a restart loop while perfectly healthy (archie-core-1174).
Both now announce at the moment each declares itself serving, the same notion
archied's runLoop announces beside healthSurface.markServing -- no second
definition of started. The Gateway announces from its serving tail
(serveGatewayListener, extracted from RunGateway), after the listener is bound;
the State Store announces after its optional surfaces have started, because a
readiness surface that fails to bind fails the boot and READY must not precede
it, and before serveStateStore, which begins accepting the moment it is called.
No unit file changes Type=notify for them; the helper already lives in package
archied beside both entry points, so no move was needed.
Tests follow the notify pattern the daemon's announcement already has: the
Gateway test drives its serving tail over a bound loopback listener with a
stub contract and judges READY against a real Snapshot RPC on the same socket;
the State Store test drives the real RunStateStore boot over a pgtest database
and waits for the datagram. Both failed red before the announcement existed --
no datagram within the window -- and pass after.
The per-kind request-ID dedup was fixed in 9cd6a2aa for the SQLite store and
carried into the PostgreSQL rewrite (038b8035) from day one: ResourceByRequest
filters WHERE kind = $1 AND request_id = $2 and resource_history carries
UNIQUE(kind, request_id). What neither rewrite kept is the test that pins the
cross-kind half of the contract -- the deleted internal/store suite had one, and
the Postgres suite only covers same-kind replay.
Pin it, and prove the failure mode it guards against: with the kind filter
dropped from the query, a request ID reused across two kinds silently returns
the first kind's history row under the second kind's write -- wrong kind, wrong
value, no error (archie-core-1179's latent hazard). Restore the filter and both
kinds write their own revisions, with per-kind replay still idempotent.
archie-core-1000's failure mode was silent persistence: provider-settings seeded
from an already-resolved snapshot stored the process-local ARCHIE_PROVIDER_<hash>
env name with no api_key_ref, and once the resource outranked the file no later
boot had a reference left to resolve. The producer was fixed in ff77612b and the
stored shape is refused in 093e677a, but nothing pinned the seed path's own
refusal: ImportConfig over a resolved snapshot must skip the kind, store nothing,
and report why -- the State Store still starts and the file document stays in
force -- rather than wedging on it or storing it.
Pin that contract, and prove the refusal comes from the guard: with
rejectBootDerivedProviderEnv removed the test fails with 'provider-settings was
stored from a resolved snapshot'.
scheduling.Duration landed in 5e95ee66 (archie-core-1169) with no test over the
JSON contract the schedules document and the jobs table both depend on: the
interval marshals the human string time.ParseDuration reads, unmarshals both
that string and the nanosecond count every schedule stored before the shape
existed carries, and refuses a non-duration string with ErrInvalidSpec. Pin it,
because a regression here fails silently in the worst direction -- the document
writes a count and an operator is back to typing 1800000000000 for one hour.
container-runtime-policies seeded and validated config.ContainerConfig directly,
the last resource in the registry whose document was the internal config struct
(archie-core-1171). encoding/json fell back to that struct's Go field names --
Image, MaxConcurrency, LegacyEnabled, Profiles -- the only Go-cased keys the Web
UI still rendered, and case-insensitive matching let a lowercase misspelling
("maxconcurrency") decode as the field while "max_concurrency" was read back
half-applied.
Define the document here instead: containerRuntimePolicies with explicit
snake_case tags and agentProfile at the profile nesting level, the same shape
267d21a2 gave the channel document. The two durations stay config.Duration,
which already writes the string the file accepts; this leak was the keys only.
The mapping to config.ContainerConfig is one function the validator and the
runtime layering share.
Reading a legacy document is deliberate, so it stays strict about everything
else: DecodeRenamingLegacyKeys renames the seven Go-cased keys an existing store
holds (and the four at the profile level), drops LegacyEnabled -- the removed
containers.enabled switch, which had no runtime consumer and no current
counterpart -- and keeps DisallowUnknownFields, because swallowing an unknown
key decodes as unset and an unset image is a broken worker. A misspelling is
refused.
normalizeContainerPolicies, through the Definition.Normalize hook the channel
document already uses, rewrites a legacy document into the current shape on
write, so a stored document converges the next time it is saved. The layering
keeps its profile semantics -- a document that omits profiles (one stored before
they existed) inherits the file's, one that carries them replaces the file's --
and now checks both spellings of the key.
docs/development/control-plane.md's 'adding a database-owned field' still
instructed the untagged practice this class of issue removes; it now names the
wire-shape rule, the legacy-key tolerance and the Normalize hook instead.
The equivalent fix was made in the crew/qc8p worktree but never committed there before the merge, so the merge silently carried the pre-fix version through despite a clean, no-conflict merge. Re-applied directly on main; task check clean.
Readiness probe test asserts each subsystem registers exactly once instead of
an ordered five-item list. Config descriptor test drops the exact-count check
and its stale settings.js rationale. Container defaults test references the
production constant.
Refs #1229#1231#1232
refuseCallCycles iterated calls (a map) in range order to pick its DFS root, so the same a<->b cycle reported as 'a -> b -> a' on one run and 'b -> a -> b' on the next -- flaky in CI (TestValidateCollectionWorkflowCalls/indirect_cycle failed ~40% of local runs) and a genuinely unstable error message for an operator reading it twice. Sort the roots.
TestExecuteTaskRequestStartsWorkflowCallCallee built its transport with no URL, so it silently fell through to nats.DefaultURL (127.0.0.1:4222). It passed locally against a developer's own NATS server and failed in CI with no servers available for connection. Start an ephemeral server per the sibling test's pattern and dial it explicitly.
Flip provider-settings, model-role-assignments, repository-policies and
scheduling-policy to ApplyMode live, and give the daemon a watch per kind
(keepWatch's reconnection and backoff rules): on a new stored version the
watch re-runs boot.runtimeConfig over the published snapshot and republishes
through config.Holder, keeping last-known-good when the layered document
fails to validate and reporting through apply status.
The stored model-role assignments now own cfg.Models entirely (the map
merge would resurrect a role the store deleted on every re-layering), and a
provider or role update rebuilds the gateway chat runtime's provider set
(swapped runtime, read per turn) and the chat model manager's offered list.
Every caller-supplied status write (Transition, ParkTask, Requeue,
RetryTask, BeginRemediation) now checks the shared taskstate transition
table inside the write's transaction, after the from guard decides
staleness. An off-table pair returns the new storecontract.ErrIllegalTransition,
carried over gRPC through mapError/unmapError on (FailedPrecondition,
"illegal transition"). Claim, BeginRemediation and RecoverStale pin
their pairs in SQL; a test pins those pairs to the table so a query
edit cannot move a write off it. Requeue/RetryTask share one guarded
requeue body. (archie-core-qdbo.5)
Scores a reviewer's findings on the 38 runnable Martian Code-Review-Bench
PRs: the deterministic core turns findings into posted comments, an
independent judge model matches them to the goldens, and the run reports
golden micro-recall and golden-only precision. The reviewer is a findings
fixture directory until the pr-review workflow lands.
Run with: task bench:prreview -- -findings DIR
Claude's input_tokens excludes cache reads and writes; the built-in
loop's Anthropic provider folds them into PromptTokens so budgets count
total prompt size. The harness adapter now does the same, so one budget
means the same on either runner.
Pairs tool_use and tool_result blocks by ID into tool-call reports, keeps
the latest session_id, takes the run's usage from the result event and
falls back to per-message usage, counted once per message ID, for a run
killed before its result. Tested on streams recorded from Claude Code
2.1.282 and scrubbed of host detail.
The lifecycle block still showed `running -> merged` and never mentioned
`completed`. `running -> merged` is now illegal (taskstate transition table)
and `merged` is reachable only from `pr_open`; a workflow that opens no pull
request ends in the terminal `completed`.
Rewrite the block to the current rules and fold the crash-recovery requeue
into the `running` row it belongs to. Regenerate the committed docs artifact
carried by `task docs:artifact:check`.
The execution transition table refuses most of the pairs shipped fixtures
wrote to build a finished task -- running -> merged, queued -> parked,
queued -> waiting_human, queued -> merged -- so those fixtures fail the
moment the store enforces it.
internal/taskstate/taskstatetest seeds a status by walking the table's
legal edges (shortest route, computed from taskstate.CanTransition), so a
fixture cannot write an illegal pair and fails loudly when no route
exists. The fixtures in internal/daemon, internal/app/archied,
internal/webui and internal/infrastructure/postgres go through it, and
the table's own test names running -> merged as refused.
The cleanup added for no-change runs removed a `completed` task's
worktree whenever it had no PR. agent.run also ends its workflow
`StatusCompleted`, and it works in a real clone whose uncommitted edits
are the deliverable, so the status alone was enough to delete the work:
no commit, no push, no other copy of those edits anywhere.
Cleanup now reads the worktree first and skips a dirty one. A worktree
whose status cannot be read is kept too -- a wrong keep costs disk, a
wrong delete costs the work -- while one that is not on disk has nothing
to keep. The lifecycle fixtures prepare a real clone now, which is the
only shape the daemon ever cleans up, and the cancelled-context test
still cancels only the cleanup call.
The workflows page's per-workflow bar and its 'N of M' text, and the
workflow picker's percent on the new-task form, counted `merged` alone.
A workflow whose runs now end `completed` (a no-change build, a triage
that needed no code) therefore rendered zero delivery beside three
sibling surfaces that already counted both.
The count moves into ui/src/lib/delivered.ts, which GatePulseCard,
ThroughputTiles and TasksSummary now read too instead of keeping their
own copies of the arithmetic. The picker's label says delivered, not
merged: a run that ends completed is not merged.
The transition table moved the no-change outcomes to StatusCompleted, so a
run that opens no pull request now ends in a status the per-workflow stats
did not count at all: it was not merged, not in review, not parked, and the
workflows page would have shown it as a run that went nowhere. The count
travels the whole State Store path, since every dashboard consumer reads it
through the gRPC client rather than the local store.
- WorkflowStats filters `completed` beside merged and pr_open; the SQL is
the count, so a wrong filter reads as zero rather than failing, and
TestWorkflowStatsCountsCompletedRuns holds it against a real store.
- storecontract.WorkflowStat gains Completed (json "completed"), the proto
message gains field 9, and workflowStatProto/workflowStatValue carry it;
TestWorkflowStatProtoCarriesEveryField round-trips every field by name.
- The gateway's chat task report names the status.
- The dashboard counts a completed run as delivered in GatePulseCard's
totals and badge numerator, and the WorkflowStat/WorkflowStats/WorkflowRow
interfaces carry the field.
- TestOutcomeSitesAreTransitionsFromRunning is the guard that keeps the
producer and the table agreeing: it re-reads this package's tc.Outcome
assignment sites from source and requires each status to be one
internal/taskstate allows from running, so a new or moved site has to be
adjudicated against the table instead of discovered on a live run.
archie-agent mcp is a stdio MCP server, on the official go-sdk, serving a
stage's capture tools and appending accepted calls to a captures file.
The harness runner writes the tool spec and a standard mcpServers config,
registers it through HarnessSpec.MCPConfig, and reads the captures back
into the stage result. The captures file is writable by the harness user,
so the worker validates every record again with the same acceptCapture
the built-in loop now shares, and forged, undeclared or over-cap records
are dropped. A stage with capture tools on a harness without MCP is
refused before it runs.
The duplicate merge compared each finding against the ones already kept, so
overlap was transitive only through the survivors: a chain of findings 1-2,
2-3, 3-4 collapsed to one finding or to two depending on the order they were
handed in, and the two readings tied on score. It is a clustering now -- a
canonical sort, then a union of each run of overlapping ranges -- so the
surviving set is a property of the findings and not of the permutation they
arrived in, and a cluster's member is chosen by score and then by the
finding itself rather than by arrival order.
Two things the merge got wrong besides order. The PRD keys duplicates on
(file, overlapping lines, category), not on severity, so Finding carries a
Category and the merge reads it, while the severity now only decides which
duplicate speaks for the cluster. And a cluster is blocking when any member
is, so an advisory duplicate can no longer swallow the merge gate's verdict
and turn REQUEST_CHANGES into COMMENT.
diff.go read only the shape git writes. A plain unified diff -- sections
opened by a --- / +++ header pair with no "diff --git" line -- belonged to no
file and contributed no added lines, a silent narrowing of the diff-rules
gate's input; a file section opens from either now. git's C-quoted paths are
decoded from the diff --git line, the --- / +++ headers and the rename pair,
octal escapes to bytes, because a quoted path is not a path the snapshot has.
FileStatus is derived from every statement the section makes -- new file
mode, deleted file mode, old mode / new mode, rename from / rename to, and
the /dev/null side -- so a binary or empty file, whose patch has no headers
and no hunks, is reported as what it was rather than as a modification, and a
change of object type is the typechange the change capture already persists.
Score recorded a finding's duplicate identity before dropping it under its
severity's confidence floor, so a below-floor finding shadowed a later
above-floor duplicate of the same defect. The floor now runs first, and the
merge keeps the higher-scoring of two duplicates, so the result depends on
which findings were given and not on the order they were given in.
The duplicate rule was byte-identical line ranges. The PRD's rule is
overlapping lines: two same-file, same-severity findings whose ranges share a
line are now one finding.
FileStatus said "removed" for a deleted file, a second vocabulary for the
status the repository persists as "deleted". The value says "deleted" now.
Every phase of docs/prds/pr-review-agent.md that can be computed is computed
here, in a package that imports the standard library only: diff parsing with
renames, deletions, multi-hunk files and no-newline markers; directory
clustering; per-language blast radius; evidence packages; scoring,
deduplication, line mapping to diff coordinates and the review event.
The review event is REQUEST_CHANGES when a finding is blocking and COMMENT
otherwise; there is no approving value, because archie does not own the merge
decision.
internal/domain/workflow/prreview is now the one diff parser in this
repository: the diff-rules step's addedDiffLines delegates to it and the
private hunk-header and path helpers it used to carry are deleted, so a
repository rule and a review comment cannot disagree about which line a change
introduced. diff_rules_test.go is unchanged.
Blast radius resolves Go imports through the module path in go.mod, Python
module names, and JavaScript/TypeScript relative specifiers, all against files
inside the snapshot; an import that resolves to nothing there contributes no
edge. Evidence extraction reads through an fs.FS rooted at the snapshot, so
both are tested against fstest.MapFS fixtures.
NOTICE records the derivation from PR-AF (Apache-2.0).
StartKit calls InstallDone after the install hooks, before files and
startup hooks, so the caller moves the egress session to its runtime
policy exactly where the Kit spec ends the install phase.
StartKit creates the Kit container with archie's worker as its root
entrypoint and credentials, the Kit's volumes keyed by execution, then
runs install hooks as their users, writes the Kit's files as the harness
user, and runs startup hooks. A failing hook removes the container and
reports the hook's output. The Docker test proves on a real container
that the harness user cannot read the worker's environment, and fails if
the worker shares the harness uid.
Assemble turns an admitted Kit composition and the workload image's
config into the harness spec (the image's user, never root; the image
env plus the workspace, egress and credential sentinels; the launch
argv and agent-sessions verbs), lifecycle hooks with their declared users
and restricted environments (the image-derived baseline, egress settings,
and only the runtime variables each hook declares), the Kit's files, and
volume names stable per execution.
A Kit task's worker shares the sandbox network with its harness, so it
reaches NATS and the State Store through the relay like the harness
reaches the proxy. archie-agent relay takes repeated -forward
listen=target pairs, binds them all before serving so a port conflict
fails at start, and stops every forward when one fails. RelayArgs builds
the command from the fixed relay ports.
A Kit task runs worker and harness in one container, separated by user:
the worker keeps its credentials as root, and every harness invocation
runs as the Kit's user with only its declared environment. A nil env
would inherit the worker's, so the runner always passes an explicit one;
root is refused as a harness user, and a root worker refuses to start a
harness with no user. The PRD's container layout now says one container
per run, with the relay forwarding the proxy, NATS and the State Store.
The harness runner made internal/agentexec import go-git, which the tools
module reaches through docsgen, so tools/go.sum needed its entries; tidy
also dropped the stale modernc sqlite requirements. Request gained the
Harness field, so contracts.json is regenerated with the HarnessSpec
schema.
A stage whose request carries a HarnessSpec runs the Kit's CLI as a
subprocess in its own process group, with the mission and archie's rules
as the prompt. After every invocation the runner compares HEAD, every ref
and the git configuration, and the worktree against a pre-run baseline:
any ref or config change, a protected-path edit, or a write in a
read-only stage parks the step whatever the CLI claimed. The runner runs
the gate itself and resumes the same session with the gate's output, up
to the gate's failure cap. The wall clock and cancellation kill the whole
process group, so the CLI's children cannot outlive the step.
A session carries its run and its Kit's credential@1 requests. The proxy
applies apiKey inject rules only in the credential's phase and only to
hosts its rule names, after the network policy has admitted the request,
so a key never reaches a host its Kit did not declare. The real value
comes from a Resolver that returns only secrets the run credential
carries: a required credential that is unbound or unresolvable stops the
request before anything is sent, and an optional one passes only when it
is genuinely unbound. Named keys appear in the sandbox as a sentinel;
inject-only keys have no presence.
A harness is an agent profile whose environment is a Kit composition, so
image profiles and existing workflows are unchanged and only Kit runs take
the egress path; the relay replaces the claim that containers reach the
proxy directly. Credentials, step records, store installs and reviews are
org-scoped under the run credential and the Authorizer, and workflow calls
are linked across executions rather than nested.
Each sandbox gets an internal bridge on which the host holds no address,
so host services listening on every interface are unreachable; the relay
is attached under a fixed alias and is the one way out. ProxyEnv gives a
sandbox container its proxy URL and CA trust. The Docker integration test
proves allowed egress works and that the proxy listener, host services and
the internet are unreachable directly; it fails if the host-address
inhibition is removed.
archie-agent relay listens on the sandbox's isolated network and joins
every connection to one fixed target, the proxy. The relay holds no
secrets and can reach nothing else, so the host needs no address on a
sandbox network at all.
CONNECT tunnels and absolute-form http requests authenticate to a
per-container session, are checked against the session's phase policy,
and are forwarded with verified upstream TLS. A tunnel serves only its
admitted host: mismatched SNI and Host headers are refused. Upstream dials
refuse loopback, and refuse internal addresses unless the policy names the
exact IP, so an allowed name cannot resolve back into the host.
Decodes published descriptors from the manifest annotation, composes one
workload with its mixins through the Kit spec package, and applies the
runtime's support table: unsupported required capabilities refuse the
launch, optional ones are skipped and recorded, and forge or passthrough
credentials are refused. A composition must carry a headless prompt verb.
configuredSecretRegistry resolved provider keys in place, and the State Store's
copy of the config shared the providers map with b.cfg, so ImportConfig seeded
the process-local ARCHIE_PROVIDER_<hash> env name. Provider resolution now
runs only in the daemon and gateway boot (openStores).
A role has one value, so its row is the control instead of an accordion
that reveals the same text. Embedding pairs a provider select, limited to
configured providers whose class the embed package implements (openai,
openai-compatible, gemini, ollama, cohere, mistral), with a model name; the
chat model list never held embedding models.
archied already finds usable providers (key set in the environment, or
configured) through the model catalog; the published config view now
carries that catalog, providers with their model ids. Settings > Models
offers role models only from configured providers, lists the catalog's
unconfigured providers as available, and adding one carries its class, key
variable and endpoint. Roles and providers are two accordions, each ending
in an add row.
The four roles the daemon reads always show and cannot be deleted;
clearing one unsets it, and custom workflow roles can still be added.
Provider class is a select of the SDK's classes, the provider name is a
heading rather than an input, and a key read from the environment shows
as one line with Set reference instead of an 'unset / unset' reference.
It read as an alert that something had changed. Restart needs show where
they apply: in the review drawer for the changes being saved, and in the
Restart pending banner once a saved change is waiting on a restart.
A non-200 answer to /api/stream (the backend restarting behind a proxy)
closes an EventSource for good, so the top bar read Disconnected until a
reload while every fetch worked. The live-updates store now reopens it
after 1s, doubling to a 30s cap, and resets once live. The connection
status becomes a dot and a label, coloured only when not connected.
History drops the edge fade, which washed out its first and last columns
though nothing overflowed, and its section filter names the section
rather than showing the raw kind.
Drops every page subtitle and the hints that restated their label; the
rest become a few words ('Empty: truncate.', '0 = no limit.'). Empty states
and notes shrink the same way.
A Capture → Map → Bind strip with each step's count opens its tab. The
tabs follow that order, sit left-aligned at their own width and carry
count chips; a count that could not be read stays blank. The Inspector
splits into list and detail only when there is a capture to show, and an
empty event-types list explains where proposals come from.
The page says what it is for and whether capture intake is listening,
once that is known, instead of the Inspector repeating the global stream
state. An empty capture list offers the webhook address with a Copy
button.
Repository with recent ones one click away, the workflow as a radiogroup
of cards showing runs and merge rate, title and instructions, and the
identity (the server requires one) defaulted to the first active actor
under an Advanced disclosure that names it. Cmd/Ctrl+Enter starts the
task and opens it. Replaces the Start work form. Workflows shows an empty
state rather than an editable template when there is none.
The list shows each stored workflow with its runs, merged-of-runs bar and
average tokens. The editor has Definition (ID and YAML, Validate & save,
Remove, Restore this workflow), Performance (slowest stages and failures
for the selected workflow only) and Runs (its tasks, linking to each).
Restore shipped and New workflow sit in the header. The Start work card
leaves the page: New task in the top bar starts work.
Header: breadcrumb, title, status pill, workflow and forge links, with
Start a new run as the page's one action; a parked task opens with its
park reason in an amber banner. The log/changes/configuration/debug tabs
take the main column; a right rail lists every attempt with its outcome
(replacing the pager inside the stage rail), the selected attempt's
stages, and the task's details.
The header states what is running and what needs a human instead of a
greeting. A stat strip replaces the throughput tiles. The main column
opens on a Needs you queue: each waiting task with its status, title,
repository, workflow and park reason, an Open link and the actions the
server offers for it. Live activity follows; quality gates and the token
outlook move to a right rail.
A failed task-list fetch no longer reads as an empty list, which would
have told the operator nothing needs them; the header says it cannot
reach archied instead.
Plugins: the four extension directories. Container runtime: image, pull
policy (missing or always, the two the daemon accepts), concurrency,
uptime and volume retention as durations, network, and named profiles
with their image and tool allowlist. Advanced now holds only stop and
rollback, and the Managed elsewhere card goes. With every settings kind on
its own page, the generic schema-driven resource editor had no consumer
and is deleted.
skills_dir, plugin_dir, secret_engine_dir and containers.* were listed as
editable in /api/config's schema while the plugin-settings and
container-runtime-policies resources own those values at runtime; nothing
could save them there. Drop them from the catalog, and delete the settings
components that rendered the catalog, none of which any page used.
Replaces raw inputs, buttons and scoped CSS with the shared controls:
lifecycle as status pills, inline rename instead of a browser prompt, and
Retire behind a confirmation dialog.
Task execution: the two time limits as durations over their seconds
fields, steppers for tool steps and gate failures. Models: roles checked
as provider/model and warned when the provider is missing, providers as
cards with class, base URL and key. Repositories: one card per repository
with gate and preflight commands edited as argv tags (duplicates and
commas kept), protected paths, retries and the review, storage and
concurrency switches.
Secret references no longer claim a credential resolved or went missing:
the documents only say a reference is filled in, and an omitted boolean
prop was being read as not found.
Personas: a filterable list with the default marked, and an editor with
name, a default toggle, the system prompt with a character and token
count, Duplicate and Delete. Renaming or deleting the default keeps the
collection naming one that exists; the last persona cannot be deleted.
Schedules: an empty state, then one card per job with ID, task title,
instructions, when (interval, cron line or a single time) and overlap.
Settings opens on Personas.
History replaces the Audit card on every settings page: one change log for
all settings, filterable by section, actor and time window, with the
filters in the query so each page's History link opens it filtered to that
page. Rows show the old and new value as a diff and expand to the full
value; Restore still puts a resource back to the version before a change.
The sidebar's edge drags (or takes arrow keys) between 180 and 420px,
resets on double-click and remembers its width per browser.
Task templates every command, so the PostgreSQL health check's
'{{.State.Health.Status}}' rendered as an empty format string: dev:postgres
always reported unhealthy after 60s, the State Store never started, and the
Gateway and daemon exited on boot or retried against a store that was never
coming. Escape the template, and have dev:daemon and dev:gateway wait for
the State Store's port before starting.
One card per channel: set-up channels expand to their fields, the rest
collapse to a row with Set up. Running state shows only when the
messaging service reports it. Telegram token and webhook signing secret
are secret references (an unset signing secret reads as risky); allowed
Telegram users and chat models are tag inputs. Chat session defaults
carry the red unrestricted-filesystem row, max steps with its real zero
meaning (the default of 100), and the rate limit as requests per
duration. Drops the ChannelCard status grid.
MCP servers as editable rows per transport (stdio command and arguments,
HTTP URL, SSE endpoints) with parallel tool calls; MiniMax with its key as
a secret reference; web fetch with byte, duration and a danger-toned
private-networks toggle, its fields disabled while it is off; tool output
limits with a token estimate.
Fixes sticky positioning across the app: the frame and main used
overflow hidden, which made each a scroll container that never scrolls,
so the Settings save bar and sidebar never stuck. Both now clip instead.
Its own page under Settings > Agents instead of a generic card on Advanced:
trigger as a segmented control with the label field shown and required
only when the trigger needs one, the six forge state labels as a fixed
table, a max-retries stepper and a duration input for the poll interval.
Settings pages leave room below the last setting so it can be scrolled up
to eye level.
Edits live in the control-plane store as drafts against the version they
started from, so they survive moving between Settings pages. A sticky bar
counts unsaved changes; the review drawer shows a field-level diff per
section with Revert, and saves the sections one at a time, stopping at the
first failure. A conflicting save rebases the draft onto the latest value.
Restart pending is read from apply status. Per-card Save buttons, Live and
Version badges go; leaving Settings with edits asks first.
The top bar and the narrow Settings tabs use shadcn-vue's scroll-fade-x,
which fades each edge in as there is more to scroll to. The Settings
sidebar marks the current page with the raised background alone.
Settings is one top-bar link. Its pages render inside a shell with a
grouped sidebar (Agents, Integrations, Runtime) that turns into tabs at
narrow widths, and content capped at 960px. Channels sits under
Integrations.
Dashboard, Tasks, Workflows, Events and Settings replace the Work, Agent
and System menus. Configuration pages move under /settings/* with
redirects from their old paths; Logs and Appearance leave the bar and stay
reachable from Jump to, the Dashboard and the account menu. New task opens
the Start work form in a dialog and lands on the new task. One pill reports
the live stream's state.
Drops docs/prds/dashboard-navigation-groups.md: web UI design is not
tracked in PRDs.
Neutral warm greys with one swappable sage accent replace the violet canvas,
washes and brand gradient. IBM Plex Sans/Mono replace Geist. The light theme
keeps the same rules with a darker sage. No layout changes.
Add a self-contained design handoff under docs/design/ui-redesign/ (README,
build prompt, HTML mockups, design-canvas sources, CSS and JSON theme
tokens). docs/design/ is held back from the published docs sets like
docs/inspiration/: it is input to building the UI, not a page to read.
Remove the superseded service-decomposition research from docs/inspiration/.
The update check still read the retired archie/v* tag stream, so a host on
1.41.1 was offered runtime 1.35.0, and the installer built the agent image
from that stale tag. Both now use the release's archied/v* tag. The dist-zip
build also stamps runtimeVersion, so /version stops reporting 'dev'.
TestDashboardPagesRegistryCoversEveryRoute parsed ui/src/router/index.ts as
text, and TestTaskMetaPayloadMatchesFixture plus ui/test/task-meta-snapshot
pinned a formatted JSON fixture. They failed on formatting, not behaviour.
The page-registry test parsed the route table one line per route and the
task-meta fixture was byte-compared, so the prettier reformat broke both.
The registry test now splits route objects and ignores comments; the
fixture compares compacted JSON. Also drops a stale router comment that
described the removed redirects, rebuilds ui/dist, regenerates the
contracts artifact, keeps prettier off generated output, and installs
postgresql-client-18 in deploy.yml's gate as quality.yml already does.
Every install serves from Postgres, so the legacyread/legacyimport packages,
the archie-state-store import command, the boot gate that refused to serve
over unimported SQLite files, and db_path (which only located those files)
go. Migration 0010 drops the import_completion table.
ListCaptures and ListUndispatchedCaptures had no callers once the client
moved to the streaming RPCs; they were kept only for mixed-version rollouts.
Binding.secret was unused since signing moved to Source; its number and
name are reserved.
Each credential is now only a {engine, key} secret reference. A stale
token_env in a file is reported at startup as an unrecognised key.
nats.token_env stays (no secret-ref form), and providers.api_key_env stays:
it is the carrier the resolver writes each resolved key's env name into.
None had a production consumer: [agent] and containers.enabled were decoded
only so old files kept loading, [oidc] was never read (archie-ui takes OIDC
from flags), and [image] was validated but no provider exists.
One page per area: frontend UI, agent, workflows, daemon (task lifecycle and
event automation together), State Store, control plane and settings, and
processes and wiring, with merging work kept separate.
docs/development/ holds one page per kind of change (settings, State Store
and persistence, task lifecycle, workflows and steps, event automation,
dashboard, agent execution and containers, processes and wiring, merging
work), each naming every layer the change must reach and pointing at the
document that owns the design. The docs build puts them in the development
set; docs/index.md and CLAUDE.md link them.
Also adds the container-profile case to the validator agreement test, the
check the profiles work skipped.
A stored container-runtime-policies document that carries Profiles now
replaces the file's profiles instead of merging into them, so a profile
deleted in the dashboard stays deleted; one stored before profiles existed
still inherits the file's. Profiles drop their json tags so the stored
document keys them like its other fields.
Adds examples/profiles/Dockerfile.agent-net (agent image plus network
lookup tools) with a build-only agent-net compose service,
examples/workflows/firewall-investigate.yaml with a test that parses every
example against the registered step vocabulary, and names the postgres
service in the compose header.
ClearTerminalTasks now deletes completed tasks, with a test that holds its
SQL list to taskstate.Terminal. The AllowTools comment says agentloop's
built-in file tools are outside the allowlist and why. The PRD model
diagram lists only what a profile holds (image, tools), and the profile
field and AgentProfile say a workflow's profile name is resolved at
dispatch, not when the workflow is saved.
Workflow definitions declare inputs, repository (none, optional or
required; default required) and profile. A binding assigns each input
from a mapped parameter or a constant and may take its repository from a
parameter, which must name a configured repo; both are checked when the
binding is saved and again at dispatch. Inputs travel as structured task
data (tasks.inputs, the task brief, and a JSON block in the agent's
mission), never as body text.
A task with no repository runs in a per-task scratch workspace with no
clone and no publication grant. The agent.run step runs one mission
without a repository and finishes the task in the new completed status.
Agent profiles live under [containers.profiles.<name>]: an image and an
allowlist over the tools archie adds (MCP, scripts, plugins).
[containers].image is the default profile; an unconfigured profile parks
the task. The workflow is now pinned before the container starts so the
profile can choose its image.
Also stop two archied tests writing embedded NATS state into the package
directory, refuse an empty state_dir for embedded NATS, and drop the NATS
store files an earlier lane commit tracked.
Architecture, deployment, installer, skill and PRD text now name the Postgres
State Store, the offline recovery commands on database_url, state_dir for host
state, and db_path as the legacy-file locator for archie-state-store import.
Finalised PRDs, CHANGELOG, docs/news and docs/archive are unchanged records.
The embedded NATS store and endpoint file, the task-log registry and the
readiness disk probe resolve from state_dir (default: the data home's archie
directory) instead of the directory of db_path. db_path now only locates the
legacy SQLite files for the one-time import and its boot gate.
The State Store, event capture and Gateway conversations already serve from
PostgreSQL. This deletes internal/store and internal/infrastructure/edastore,
the SQLite gateway session store and openProductionTaskStore, and the -db
recovery path on a legacy task file; backup, restore, validate and rollback
work on the database database_url names.
- The binding-secret cipher moves to internal/infrastructure/bindingcipher and
ToolCall to internal/infrastructure/postgres.
- NewSessionStoreMemory is now a pure in-memory store that passes the shared
SessionStore conformance suite.
- Tests run against PostgreSQL through internal/infrastructure/postgres/pgstore;
legacyimport/legacyfixture writes the legacy files the import and the boot
gate read.
- The cron dialect is owned in internal/domain/scheduling, so
github.com/pocketbase/pocketbase and pocketbase/dbx leave go.mod.
modernc.org/sqlite stays for the one-time import (legacyread).
- The UI and Messaging architecture gates ban the Postgres and legacy readers
in place of internal/store.
A mapping belongs to an event type and is checked against its inferred
schema on save. Each event a mapping resolves is counted once in
mapping_matches (migration 0008), read back as match_count and
last_matched_at. Bindings carry an optional CEL filter over the mapping's
parameters, checked on save. The per-source unique indexes are dropped:
every armed binding whose mapping matches the capture's event type and
whose filter admits it dispatches once, claimed in the per-binding ledger
before its task is enqueued. The State Store gains RecordMappingMatch and
the new mapping and binding fields.
Resolves against t2db.36: captures carry both event_type and unsigned (proto field 10), the State Store serves sources and event types from the Postgres EDA store, the capture row shows event type and signature together, and the staterpc sentinels map both ways from one table.
A source is the capture endpoint: a UUIDv7 path by default or a unique
URL-safe custom path, signed by default with an Archie-generated secret
(encrypted via the bindings cipher), or unsigned after an approval.
Intake verifies X-Hub-Signature-256/X-Signature-256 against the source
secret before redaction; an unauthenticated event on a signed source is
captured but never dispatched, an event on an approved unsigned source
dispatches and is marked unsigned. The binding secret is retired; migration
0006 derives sources from existing binding and capture source strings,
moving each binding's secret onto its source. SourceStore crosses the
State Store gRPC contract. The dashboard gains a sources panel and flags
unsigned in the capture inspector, binding list and task timeline.
The State Store's task and event-capture stores and the conversation store
read by archied and served by archie-gateway now open on database_url.
Every serving process refuses to start when legacy SQLite data exists and no
import completion is recorded, naming archie-state-store import; a fresh
install records completion itself. The Gateway holds its Postgres serve
claim for its lifetime and releases it before the pool closes.
Without -db, backup/restore/validate/rollback resolve database_url from the
config and work on the whole PostgreSQL database. Restore claims every service
role; rollback claims the State Store role; validate refuses a schema newer
than the binary. The installer refuses a daemon update it cannot snapshot
first; the watchdog never restores the database and prints the explicit
offline restore instead.
archie-state-store import copies the State Store task database, the
PocketBase event store and the Gateway conversation store, all named from
db_path, into Postgres in one transaction. The bead asked for an archied
command; offline maintenance of a store belongs to the binary that owns it,
so it sits beside backup/restore/validate/rollback instead.
It refuses rather than guesses: while the state-store or gateway ownership
claim is held, when a domain it imports already holds rows (an allowlist of
that domain's tables, checked after Migrate), on a completed prior import,
on FK orphans, alias case collisions, duplicate bindings, events whose (at,
id) order microsecond storage would change, schema gaps, and any value the
target column cannot hold, naming table, row, value and rule. Historical ids
are kept and every identity sequence is set from AUTOINCREMENT's high-water
mark. After loading it compares key sets, event order, resource blobs and
binding secrets byte for byte and the next id of every sequence, checks the
source files were not written while read, and only then writes an
import_completion row (migration 0005) in the same transaction.
postgres.ImportComplete and legacyimport.HasLegacyData are the two halves
of the boot gate: legacy data without a completed import must not serve.
Restore claims every service role (state-store and gateway) non-blockingly
and refuses if any is held or the claim cannot be checked; it drops tables a
later migration added before pg_restore --clean so a restored schema matches
the snapshot. Backup validates the archive before replacing the previous one.
Ports the store's write-side clip, park-class and transition-audit coverage
from internal/store.
Closes#865. The dashboard hand-copied the Change* file-status ids and events.ConfigCapturedSchema. /api/task-meta now serves both; the Vue dashboard renders ui/src/lib/task-meta-snapshot.ts until the served catalog lands. The Go handler is pinned to internal/webui/testdata/task_meta.json and the snapshot is pinned to that same fixture, so a one-sided rename fails a test.
Wave 1 of the Postgres migration (archie-core-7r0x.9). This is the shared shape
every port lane builds on; nothing here switches a live path to Postgres yet.
- config: add `database_url` beside `db_path` (config.go), mark it bootstrap-only
in denied_keys, expose it in the webui StorageView/config schema, and add it to
config.example.toml plus all deployments/*.toml.
- docker-compose: add a postgres:18 service; `task dev` (dev:postgres) brings it
up and waits for it before the State Store boots.
- archied: `openStateStore` now opens and migrates the process-scoped Postgres
pool via `openStateStorePool`. The State Store fails closed (D1.2) when
database_url is absent or invalid rather than fall back to SQLite; serving
against Postgres later requires an import-completion record (D1.3), which is a
later lane's gate, not this one.
- composition seam: task-store construction (state_store_task.go) and EDA-store
construction (state_store_eda.go) are extracted from openStateStore, with the
pool open in state_store_pool.go. This is a behaviour-preserving refactor only
— no store, interface, error, ordering or logging change — so L1 and L2 build
against separate files instead of sharing state_store.go.
Tests: fail-closed pool behaviour is pinned (absent/invalid URL); the State Store
boot/restart tests now run against a throwaway Postgres 18 container (pgtest
TestMain). Scoped test command and module-wide build pass; see lane report.
CHECKPOINT -- the full State Store port is in progress; this lands the
compile-clean core so the review pass has a diff to work against. Remaining:
advisory-lock ownership, event-insert serialization, maintenance, and the
ported test battery.
Two corrections to behaviour that already shipped, not new features:
- UpdateTask wrote park_reason raw where SQLite applies clip(park_reason,
4000); the PostgreSQL adapter now clips before binding (clip.go).
- tasks.review_cursor existed on the protobuf wire and in workflow.Task but
not in the PostgreSQL schema; 0004 adds it as a NEW migration rather than
amending 0001 because a dev database may already have applied 0001 and
goose tracks version numbers, not checksums.
Also moves the control-plane Resource/ResourceWrite types and their sentinels
into storecontract so the postgres package can stop importing internal/store
(they stay aliased there for daemon callers).
L2 of the PocketBase->Postgres migration (bead archie-core-7r0x.3): a new
Postgres-backed EDA adapter (postgres.EDA) plus its goose migration
(0002_edastore.sql) and sqlc queries (queries/edastore.sql), satisfying the
same storecontract surfaces as internal/infrastructure/edastore.Store so the
cutover wave can swap them behind the contract. The PocketBase opener in
internal/app/archied/state_store.go is untouched: production still opens
SQLite, and the cutover waits for the one-time import.
Three recon-found hazards, each pinned by a test, not a comment:
1. Empty-secret early return. applyBinding deliberately never writes the
secret column when the incoming secret is empty, so an edit form that does
not echo the secret must not blank an armed binding's HMAC key. The
UpdateBinding query keeps the stored secret via
`secret = CASE WHEN $secret = '' THEN secret ELSE $secret END`; pinned by
TestUpdateBindingEmptySecretPreservesStored (raw column unchanged across an
empty-secret edit).
2. Unique-violation detection by SQLSTATE. isUniqueViolation previously grepped
the driver's error text for "unique"/"already exists"; Postgres reports
SQLSTATE 23505 and the text match would not fire, losing ErrAlreadyDispatched.
The adapter detects by pgconn.PgError.Code == "23505"; pinned by
TestIsUniqueViolationDetectsBySQLState (23505 with a message lacking those
words is detected; a non-23505 whose text says "unique" is not).
3. One-binding-per-source / one-armed-binding-per-source were read-then-refuse
with no transaction and a non-unique idx_bindings_source_status. Made them
constraints: UNIQUE(source) plus a partial UNIQUE(source) WHERE
status='armed' (the full unique subsumes the armed rule today, kept explicit
for a future matcher extension). A concurrent insert for one source yields
exactly one success and one ErrBindingOverlap; pinned by
TestConcurrentInsertBindingSameSource.
Dispatch ledgers kept exactly: UNIQUE(binding, capture) and
UNIQUE(playbook_id, playbook_version, event_id, action_id); binding_version is
stored but deliberately not part of the key (pinned by
TestBindingDispatchVersionBumpDoesNotPermitRedispatch). The cipher is
unchanged: AES-256-GCM, key = SHA-256(material), decrypt stays in the store and
the gRPC wire still carries plaintext.
Notify is left as an injected callback (EDA.SetNotify) and is NOT wired to
LISTEN/NOTIFY. It is dead code today: edastore.Config.Notify is omitted at its
only production construction and no consumer maps binding_changed/
mapping_changed, so building a LISTEN/NOTIFY path would be building for a
consumer that does not exist. Wired or not is a separate decision.
Move sessions, messages, turns and full-text search off the per-process
SQLite file onto Postgres behind the existing messaging.SessionStore
contract. New adapter internal/gateway/session_store_postgres.go, sqlc
queries/gateway.sql, migration 0003_gateway.sql, regenerated postgresdb.
FTS5 becomes a STORED generated tsvector column over (sender, text) plus
GIN. plainto_tsquery is the tsvector analog of ftsMatchQuery's
quote-escaping: query text is parsed as plain text, never query syntax, and
the surviving terms are ANDed. MessagePage.Truncated stays always-false on
Postgres too: the result set is counted exactly.
On internal/domain/messaging/session_store.go: this is a comment-only edit
to the MessagePage.Truncated doc comment (the brief's own "change the
comment" instruction). It changes no type, method or value, so L2 and the
import lane still build against an unchanged contract and the wire is
unaffected. No interface widened or altered.
Semantics preserved verbatim:
- The timestamp clamp is SQL-atomic (INSERT ... SELECT MAX(ts)+1). Appends to
one session are serialised by a transaction-scoped advisory lock keyed on
the session so two concurrent appends cannot read the same MAX(ts); a Go
clamp would race (proven by the new cross-handle monotonicity test).
- Session ordering is GREATEST(last_active_at, created_at) with a matching
expression index.
- ClaimTurn is insert-first (ON CONFLICT DO NOTHING), with a race test across
two handles.
State outside the store is NOT made shared by this change, and none of it is
silently improved or worsened:
- sessionTracker.active, Router.titling and per-session persona selection are
in-memory, per-process caches; a second Gateway still diverges from the
first.
- messaging.Turns lanes and the per-process recovery latch stay per-process.
- RecoverTurns still fails every turn owned by another process, so a second
Gateway starting would still fail the first's in-flight turns. This lane
does NOT make that safe and does not try to: the safeguard is D4.1's
single-Gateway advisory serve-ownership lock (not implemented here), which
prevents a second Gateway from serving at all. The turn-recovery semantics
are left exactly as they were.
Production openers still return SQLite; this lane adds the adapter and tests
only. The cutover and the state-sharing questions remain follow-up work.
goose migration 0001 lands the twelve State Store tables on Postgres, and sqlc generates the task queries from it. Two behaviours that genuinely differ from SQLite are pinned by tests against a real PG 18: claiming takes the oldest queued row with FOR UPDATE SKIP LOCKED (without the clause a second claimer blocks, which the test shows by timing out), and every column behind a Go int is bigint -- SQLite's INTEGER is 64-bit, and the chat issue-number allocator seeds at 10^15, which does not fit an int4.
task db:generate writes the committed postgresdb package; task db:check regenerates it in the gate, as proto:check and ui:check do.
The remaining store methods (events, resources, identities, the status tables) still run on SQLite: porting them is the rest of archie-core-7r0x.2.
stateadmin served read-only PocketBase views over the SQLite task file on -admin-addr. PocketBase is SQLite-only and the State Store moves to Postgres (archie-core-7r0x), so the view goes; operators use a Postgres tool of their choice.
internal/infrastructure/postgres opens a pgx pool, checks server_version_num >= 180000, and applies goose migrations with a Postgres session advisory lock so processes starting together apply each migration once. internal/infrastructure/postgres/pgtest starts postgres:18 through testcontainers per test binary and gives each test its own database. Adds jackc/pgx/v5 v5.11.0, pressly/goose/v3 v3.28.0 and testcontainers-go v0.44.0. The database URL config, sqlc, the Compose service and the ownership lock move to archie-core-7r0x.2, where they have consumers.
Approved design for orgs and workspaces, people and agents as identities, the Cedar policy chain (instance with network rules, org, workspace, identity and workflow, object), server-derived credential scope, and one run credential per agent run. Secrets move from agent profiles to identities; event-automation.md is marked superseded where it said otherwise.
task test runs -short with the test cache on; task test:full keeps the
uncached run. The 50s keepalive proof skips under -short (the deploy
workflow's full go test still runs it). Sleep-bound archied watch tests
run in parallel, and the read-only gate steps run concurrently after fmt
and proto:check. ui:deps is run: once so the parallel UI steps install once.
bindingPayload sent mapping_id as Number(id), which is 0 for every current mapping id, so every binding created or edited from the dashboard was refused. A new binding now starts with a generated secret the operator copies to the sender; an edit keeps the stored one unless replaced. The dev proxy keeps the browser's Host and forwards /webhooks. Checked with typecheck, task ui and task test:ui; the full gate was not run.
Nothing moved a binding out of draft except an unrelated edit, so a newly created binding could not be approved and the dashboard showed no Approve button. Draft is removed; existing draft rows are promoted to pending_approval when the EDA store opens.
Vite's proxy shorthand sets changeOrigin, so every mutation through the dev server failed archie-ui's same-origin check. The mapping and binding editors rendered their refusal at the top of a scrolled dialog, out of view of the Save button.
Replaces sourcegraph/jsonrpc2 with the go.lsp.dev stack (protocol, jsonrpc2, uri). The exit notification now ends Serve; closing the connection from inside the exit handler deadlocked.
The quality gates card stacked its number and rows across the full row
width -- the rate pinned to the left edge, the counts to the right --
which reads as two places at once. The card now has two internal
sections, left to right: the rate, and the per-workflow rows that
explain it; the row collapses under 720px.
Also swept the restating descriptions: 'Work that passed its quality
gates' under Quality gates, 'Archie needs these before it can work on
its own' under Finish setting up, 'Next 30 days at the current rate'
under Token outlook, 'Last 50, newest first' under Live activity. A
title and a sentence that restate each other are noise; the table or
chart says the thing. CapturesCard's redaction note is a security fact,
not restatement, and stays. The unconfigured versions state is one
quiet line, not a card with a title, a description, and a sentence.
Three dashboard refinements from operator feedback:
The setup panel's completed state was celebration prose -- a full card
saying setup was done, occupying a grid cell until dismissed. A
configured daemon is the absence of a problem: the state machine now
only distinguishes incomplete from omit, the checklist returns on its
own if setup regresses, and the dismissal machinery is deleted with it.
'Gate pulse' led with a donut whose entire payload was one number, and
the name was decoration too. The card is 'Quality gates' now: the pass
rate as the number itself beside its run count, per-workflow rows as
tight hairline rows instead of muted pills, and the parked line is gone
-- Throughput's Needs-you tile already speaks for parked tasks, from the
statuses themselves. base/Gauge.vue had no other consumer and is deleted.
Topbar nav groups open on hover and close on leave, with a short grace
period bridging the trigger-to-content gap; click and keyboard
activation keep working through the same controlled open state.
The live activity feed scrolls within its card (previous commit); the
health row's cards are now compact enough to match it.
Group rows multiply with the number of interleaved tasks -- one group
per task per detail shape -- and nothing capped the card's height, so a
live instance rendered the dashboard ~4,700px tall with a void beside
the token outlook card. The feed now scrolls inside a 28rem region with
a sticky header: newest events at the top, the rest in place, and the
RIGHT NOW section's two cards stay comparable in height.
The release commit lands on main, because tools/release.sh refuses to run
anywhere else, while the working branch keeps advancing. So after every release
neither tip is an ancestor of the other and --ff-only fails in both directions
-- a refusal that reads as "the tree is not ready" when the tree is fine. It
cost confusion on both v1.38.0 and v1.40.0, and both times the correct answer
had to be re-derived from the commit graph.
Documents the order that keeps a conflict off main (merge main into the branch
first, then fast-forward), and the trap that catches people looking for main: a
detached worktree sitting at the same commit accepts --ff-only and moves
nothing, which looks like success.
The branch and main diverged at 8faa0f6a: the release commit was cut on
main while the branch kept advancing with the park-classification wave.
Merging main here first, so main can fast-forward to the branch tip
without a merge on the release side. No content conflicts: the release
commit touches the changelog and news artifacts only.
Domain fields ParkClass/RemediationRounds landed in d6f61c2c; this is
the wire and daemon half. Task gains park_class (32) and
remediation_rounds (33) and maps both directions; the classified park
write crosses the wire as ParkTask on a narrow TaskParker contract
(TaskLifecycle stays under the 8-method cap), with conformance
coverage local + grpc including the stale-guard sentinel and
needs_human normalization. Every daemon park site now states its
class: terminal for a repo that left config and a retired identity,
transient for the environmental parks (worktree, storage, grants,
taskrun), and identityMayAct returns the class beside its reason.
d6f61c2c added Task.ParkClass and Task.RemediationRounds to the domain
without the wire half; the parity guard went red. Add the two proto
fields (32/33) and map both directions in values.go.
Two beads, one root: four sites stamped a version and only two of them were CI.
`Taskfile.yml`'s build and `install.sh` derived GATEWAY_VERSION/RUNTIME_VERSION
from `git describe`, so a from-source build claimed a release it was not
running, and the stamp became a function of the commit graph -- the one input a
content-checksum build cache cannot see. An empty commit moved `git describe`
while `task build` reported "up to date" and shipped the previous stamp
(archie-core-pdq2). Both sites now stamp `dev`: a source build says so, and the
version a release carries is written into the artifact CI publishes. That
removes the non-file input rather than caching it, and traceability for a local
build is the checkout it came from.
`deploy.yml` published `:latest` from any push to main, so a release's own
stamping survived only until the next ordinary commit -- minutes, in an active
repo -- and a host deploying :latest reported dev, leaving the update path
unable to tell current from stale (archie-core-i5nb). `:latest` now moves only
from a commit that IS a release; every other build publishes `:edge` (mutable,
newest main) and `sha-<commit>` (immutable). A host that runs releases follows
`:latest`; a host that tracks main follows `:edge`, which RELEASING.md now says.
Verified: `task build` reports `archied dev`; the new workflow test fails
against the old workflow on all five guards and passes after; deploy.yml
parses; install.sh passes `bash -n`.
Gated with `task check` (exit 0) at 8faa0f6a -- the v1.39.0 base, CI-green --
with these five files applied. It is NOT gated at HEAD: HEAD carries an
unrelated red, `TestTaskProtoCarriesEveryDomainField`, because d6f61c2c added
ParkClass and RemediationRounds without the proto mapping. This change neither
causes nor fixes that.
The classification rides the API for free (taskView embeds task.Task),
so this is the read side only: a parked row shows what kind of
intervention it needs -- needs you, transient, terminal -- as a chip
with the answer in its tooltip, instead of a bare Parked every time.
Non-parked rows render nothing.
The F2+F3 schema wave from the auto-fix/resume investigation, sequenced
together as one migration. Every failure funneled to one parked status
with free-text ParkReason, and Task.RetryCount doubled as the
operator-retry budget and the review-remediation round budget -- so N
operator retries ate the remediation budget, a repo-level round cap
could re-park a task an operator had just legally retried, and no
surface could answer what a park needed from an operator.
Park class (F2): a producer-recorded vocabulary in taskstate --
needs_human (the default, so an unclassified park always reads as
operator-actionable), transient (environmental; a requeue can succeed),
terminal (retrying is pointless). Recorded at the park site, never
inferred from reason text; NormalizeParkClass makes unknown values
persist as needs_human. Transition-to-parked defaults the class, so
every existing unclassified park site reads correctly with no call-site
churn; the classified ParkTask write follows for parks that know
better. Requeue, RetryTask and BeginRemediation clear the class back to
the default with the reason.
Split budgets (F3): Task.RemediationRounds is the remediation's own
budget; RetryCount stays the operator's. The round-cap stage counts and
caps rounds; operator retry keeps counting RetryCount and can drive a
task to dead without touching rounds. remediation_rounds is a
presence-gated migrator column written through Update.
Known state: proto fields, the ParkTask RPC, the staterpc mapping and
the daemon-side park-site classification follow in the wire half of
this wave (the proto parity test is intentionally red until then).
Sequencing steps 6 and 7 of pr-review-remediation.md: the consumer
landed in 052e350b, and these are the two sources that feed it.
Webhook (decision 2, low latency): the GitHub receiver decodes
pull_request_review and pull_request_review_comment events behind the
existing HMAC verification and publishes the same typed reaction the
poller produces, keyed source-independently so PublishUnique collapses
the two sources. Only submitted/created carry a verdict to remediate;
edited and dismissed are acknowledged. Reaction deliveries are
rate-limited per source (decision 6's 'add when the receiver gains a
second event family'), and the reaction path carries no dispatch
predicate -- eligibility is the consumer's owned-PR lookup.
Poll (both forges, the no-webhook backstop): one shared scan over all
pr_open tasks, each with the forge client its own identity owns
(reconcilePRs's shape), listing reviews and comments since per-task
persisted high-water marks and skipping the owning identity's bot user
(decision 5's own-comment exclusion, which the poll is positioned to
make identity-correct).
The cursors are two, not one: review IDs and comment IDs are independent
forge sequences, and a combined high-water mark would silently skip
reviews once a larger comment ID landed. watch_comment_id -- dead since
the comment-watch design it was created for never shipped -- carries the
comment cursor; review_cursor is a new presence-gated migrator column,
and SetReviewCursors is its guarded RPC (pr_open only, so cursors never
move under a run that owns the task). forge.ReviewComment gains ReviewID
so a comment is collectable into its review's unit (decision 5) on both
forges, and forge.Review gains Body so poll-delivered reviews carry
their summary.
Note: the store/proto/facade half of this work landed early in a65eae24
under a release session's message -- a shared-checkout collision, kept
rather than rewritten; that commit carries the review_cursor migration
and the SetReviewCursors contract, this one carries the producers.
docs:artifact:check regenerated the artifact from a directory walk of
docs/, which also sees an UNTRACKED page. The committed artifact then
looked stale and the gate demanded a regeneration that was already
correct -- one that would have committed a page belonging to no commit.
It cost two sessions in one day: a migration branch, and an unrelated
writer adding a PRD.
Enumerate through `git ls-files --cached` instead, so a page the commit
carries is required in the artifact and a working-tree scratch file is
not. The index counts as well as HEAD, deliberately: a page staged for
this commit is about to be carried by it. Outside a git work tree there
is no commit to disagree with, so the walk is kept and says so on stderr
rather than passing as the stronger guarantee.
Test fails against the walk with the gate's own message ("is stale;
regenerate it by running ...") and passes against the enumeration.
Beads sync to a Dolt remote, so anything written into one is published.
Two beads filed earlier today named an operator host, its internal
address and its filesystem paths -- the tracker was treated as a private
store, which it is not.
The rule is stated where the tracker is described, next to the existing
one about .beads/ never reaching a commit, because it is the same class:
the tracker is not a private store. Host-specific facts belong in the
operator's memos instance, which a bead may point at.
The remediate workflow was registered but had no trigger: the reaction
stream was provisioned, the envelope, resolver and owned-PR lookup all
landed, yet nothing consumed the stream (pr-review-remediation.md's
sequencing left the consumer for this step). The daemon now drains the
reaction stream each cycle, before the task drain, so a reaction can be
claimed in the same pass that carried it.
Per decision 3, the store's owned-PR lookup is the authorization
boundary: an unmatched, merged or closed PR drops with a counter, and a
public reaction can never start an agent against a foreign repository.
Per decision 5, a review is the unit of remediation -- its comment
events are appended to the unit while it is queued and dropped once the
run is claimed (the round cap bounds the exchange); a standalone comment
is its own unit of one; approved reviews never remediate; and archie's
own comments, matched on the owning identity's bot user, are excluded so
its replies cannot retrigger it.
The guarded BeginRemediation/UpdateReviewPayload store methods are the
dedup: the pr_open -> queued transition carries the review unit in the
same write, so re-delivered reactions fail the status guard instead of
starting a second round. Both are new StateStoreService RPCs following
the Requeue shape, covered by the local/grpc conformance battery.
The maintainer approved task-run-master-detail.md after the
adversarial-review round; its status moves Draft -> Approved while the
work it describes is completed and verified.
A stage filter is a command scoped to the attempt it was made on: the
rail set it against that attempt's stage list. selectAttempt and
performRetry left filters untouched, so a stage selected on attempt 2
carried into attempt 1 -- a same-named stage there rendered as selected
without ever being commanded, or the log stayed narrowed to a stage the
new attempt does not have. The stage filter now resets when the selected
attempt changes; the level filter is attempt-agnostic and survives.
The master-detail PRD absorbs the adversarial review's verified findings:
the reload claim is narrowed to the URL contract (filters are not in the
URL), the unimplemented scroll and pinned claims are dropped, the
unnamed-stage and level-filter contracts are stated, the rail inventory
is corrected, and the acceptance list gains criteria for the
command-not-binding rule, attempt-switch reset, and keyboard selection.
The first cut grouped consecutive same-kind events, but the real noise
shape is an interleave: one background cycle emits curator_run,
session-memory and curator_action events carrying the same payload, and
kind-keyed grouping left them all visible. The grouping key is now the
rendered detail plus the task, so one cycle of noise collapses to one
row regardless of which internal kind emitted each event, while events
carrying different information never merge. Verified against a live
daemon: 50 background events collapse to one expandable row.
The five tabs gave the stage rail less than a third of the screen and
disconnected the log stream from the stage that produced it. The stage
rail is now the page's master pane, always visible; the four context
panels are the inspector and own the tab bar. Selecting a stage commands
the inspector to the log tab with that stage's filter set; clicking the
selected stage clears it. Selection is a command, not a binding -- the
operator can change the filter afterwards.
No endpoint, RPC or contract changed. tab=stages still resolves, to the
log tab; every inspector tab and attempt deep-link survives a reload.
Below the shell's 900px frame breakpoint the rail stacks above the
inspector. Design of record: docs/prds/task-run-master-detail.md (Draft,
per-run panel contracts unchanged from task-run-detail.md).
The feed's 50 raw events were dominated by consecutive same-shape
background rows (session-memory cycles, runner calls), which buried the
milestones the dashboard exists to surface. Consecutive events sharing
one label and one task now collapse into a group row with an xN badge;
expanding it reveals its events in place. The grouping is consecutive,
not global, so interleaved kinds keep their order and a milestone is
never merged with an event that merely shares its kind.
The projection is a pure view over the store's raw stream (activity-group.ts,
table-tested); the store keeps every event. Group rows keep ActivityRow's
link contract, and the disclosure button is stop-propagated inside the
first cell so it never fights the row-level link.
Carries the stack facts agents must not fight (token file, ui/dist as a
generated LAW asset, feature layout, UI gates), the operational-tool
design rules, the WCAG AA bar, and the rule that external design
prototypes are specs to translate, never code to port.
The info token doubled as badge text on info-soft and as the log-level
label, and failed 4.5:1 there (4.29:1 dark over card, 4.45:1 over glass;
light theme 4.11:1 on canvas, 3.58:1 on its soft). Dark --info moves to
#B08BF8, light --info to #6F47A6, both clearing 4.5:1 on every surface
they land on. Light --fg-subtle moves to #675E6F for the wash-composited
canvas where the old value measured 4.44:1. Measured pairs recorded at
the token definitions.
2026-09-23 11:05:56 +10:00
2957 changed files with 223138 additions and 228827 deletions
Run a bounded fleet of coding agents across archie-core's backlog without
flooding review. Load when fanning work out into parallel lanes, waves,
worktrees or subagents on this repository; when a lane worktree dies with the
unknown-agent error for `cp-writer`; or when deciding what every lane call must
carry, which gate evidence to demand, and how a lane's scoped test command
should be shaped here. Carries archie-specific fleet facts only; the method
lives in the user-scope high-throughput-programming skill.
---
# Run an agent fleet on archie-core
This skill carries the facts about *this repository*. It deliberately does not
restate the process.
## Where the method lives
The how is the user-scope skill `high-throughput-programming` at
`~/.agents/skills/high-throughput-programming/`: doctrine, pipeline shape, the
interview that scaffolds a run, the pi-subagents ceilings and traps, `scripts/`,
`templates/` and `references/`. Read its `INTERVIEW.md` before scaffolding a run;
never scaffold one from memory.
**Precedence.** That skill is normative for method; this one is normative for
archie's facts. If they disagree about the process, it wins. If they disagree
about this repository — a path, an invariant, a gate — this one wins, because the
method skill is repository-agnostic by construction.
Route runtime facts to `archie-run-and-operate`, toolchain facts to
`archie-build-and-env`, and dependency/boundary rules to
`archie-architecture-contract`.
## Invariants every lane call must carry
State these as facts to each lane, not as advice. Each one has cost a real run.
| Invariant | Why it matters to a lane |
|---|---|
| **The control plane fails closed.** A stored resource that will not validate stops `archied` starting, and nothing bypasses the control plane at boot. Resource history is the only in-band remedy, and it needs the State Store up. | A lane touching the boot path, a stored resource kind, or the recovery commands is a risk-routed lane for the operator's eyes, not a gate-and-merge lane. Evidence: `docs/architecture/safe-change-and-recovery.md` ("Database settings: degrade paths and recovery"). |
| **`internal/webui` must not reach `internal/domain/workflow`.** Go imports are atomic: one reference relinks the whole daemon runtime into the UI binary. | `cmd/archie-ui/architecture_test.go` measures the linked binary (`go list -deps .`), not the imports, and fails on anything under `internal/domain/workflow`. `internal/domain/workflow/task` is a named `gateExceptions` entry that must stay linked — it carries only contract and view types, and a stale exception fails the test in both directions. The same test's gate also excludes `internal/app/archied` from the UI binary, so a helper needed by both the daemon and the `cmd/` binaries belongs in `internal/infrastructure/configuration` (which already owns path resolution), never in `archied`. |
| **The task DB has one owner.**`<db_path>-tasks.sqlite` is served by the standalone `cmd/archie-state-store` process alone. No second listener, no in-process serving path in the daemon or Gateway. | `boot.openStateStore` (`internal/app/archied/state_store.go`) is the only production caller of `openProductionTaskStore`, and it takes an exclusive flock on `<db>.lock` for the process's life — a second State Store on the same file fails there rather than merely being discouraged. Offline maintenance belongs in subcommands of that binary, never a new `cmd/` entry (`docs/architecture/organisation.md#process-boundaries`). |
| **Never commit `.beads/`.** Bead state moves through Dolt; `issues.jsonl` and `interactions.jsonl` are local-only. | A lane that stages `.beads/` pollutes its diff. Closing a bead is not commit-worthy on its own. |
| **Generated assets are LAW.**`ui/dist/` and the schema outputs (`docs/data/generated/contracts.json`). | Incorporate them into the commit that shifted them. Never revert, regenerate away, or leave them out. |
| **Scratch goes to `/tmp` only.** Never the working tree. | `worktree.CommitAll` stages with go-git's `AddWithOptions{All: true}` (`internal/worktree/worktree.go:502`), which does **not** honour `.gitignore`. An untracked scratch file in a lane worktree is swept onto the task branch. The task brief lives in `.git/task.json` for exactly this reason. |
| **A config field must survive the control-plane round trip or it does nothing.** A field added to `MCPServer` (or any projected settings type) must be carried in three sites: `mcpServerSettings` and `seedTools` in `internal/app/controlplane/tool_settings.go`, and `runtimeToolConfigFrom` in `runtime_config.go`. | The control plane rebuilds the whole resource from that projection, so a field missing there is silently dropped whenever a control plane is configured: the setting parses, appears in the dashboard, and has no effect. `TestToolSettingsProjectionCarriesEveryMCPServerField` reflects over `MCPServer` and fails on an omitted field, in both directions (seed and layering) — but it covers that type only; every other mirrored type (`minimaxSettings`, ...) is still hand-mirrored. Adding the field to just `internal/config` is the `xrux`/`parallel_tool_calls` failure shape. |
| **Dependency direction is `cmd -> app -> {domain, infrastructure}`**, with infrastructure implementing domain contracts. | A lane that needs a new edge says so before writing it. The `internal/{logging,events,eventbus,policy,taskstate}` cross-cutting packages import zero internal packages. Source: `docs/architecture/organisation.md`. |
Run it on the host, per lane. It executes the scoped tests, then a module-wide
build (`go build ./...`) and the linter (`golangci-lint run ./...`), and emits
JSON for the harness to use as the child's structured output.
The two extra checks are required, not optional. `go test ./pkg/...` compiles
only that package, so a changed constructor signature or interface passes its own
lane and breaks the next package to merge. That shape has bitten twice here: one
lane changed a constructor's signature, passed its own gate, and failed three
packages the moment it merged; formatting and lint drifted the same way, and only
the repository gate saw it. Both failures are paid for inside the lane when the
gate runs the build and the linter, and at merge when it does not.
A copy of the script under `.pi/control-plane-run/` is that run's disposable
state and may lag the skill's version. The skill's copy is the one to trust.
## Shape a lane's test command like this
Name every package the change can reach, plus `go vet` on the same set:
```bash
go test ./internal/app/controlplane/... ./internal/domain/applystatus/... -count=1\
&& go vet ./internal/app/controlplane/... ./internal/domain/applystatus/...
```
Real examples, from the worked example's `lanes.json`:
| Lane surface | Scoped command |
|---|---|
| CLI subcommands and the State Store contract | `go test ./cmd/... ./internal/infrastructure/staterpc/... -count=1 && go vet ./cmd/...` |
| Workflow registry and the agent worker | `go test ./internal/domain/workflow/... ./internal/app/agentworker/... -count=1 && go vet ./internal/domain/workflow/...` |
| Config decoding and daemon boot | `go test ./internal/infrastructure/configuration/... ./internal/app/archied/... -count=1 && go vet ./internal/infrastructure/configuration/... ./internal/app/archied/...` |
`task check` is the *serial full gate* — fmt, proto checks, `docs:check`, vet,
lint, build, `go test ./...`, the tools tests and the dashboard tests. The merge
train owns it. Never run it in a lane, and never two at once: it saturates the
host.
"Never two at once" includes gates you did not start. More than one agent session
works in this checkout, so before the merge train gates, check who holds it:
short_description:"Run bounded agent fleets on archie-core"
default_prompt:"Use $archie-agent-fleet to fan work out across lanes on this repository, carrying the fleet invariants, the gate evidence it needs, and the worktree agent-discovery fix."
and the validating side and the executing side must resolve it identically.
8szi has nothing to register against until fwmp lands. These two are never
concurrent writers.
- **xrux decides i3qm's blast radius.** xrux is an investigation with two
opposite outcomes: either the file overlay zeroes omitted map fields, in which
case `foldOverrides` moves there and it is a live bug, or it does not, in which
case `apply.go`, `apply_test.go` and `Loader.ApplyOverlay` are deleted. Both
land in the same package i3qm rewrites. One lane owns both, in that order.
`archie-core-xrux` is a trap, not a cleanup. Read the bead before deleting
`apply.go`.
- **eju6 proves the others.** It goes last, against everything merged.
---
## 4. Models: resolve before Wave 0
Run `subagent({ action: "models" })` first and pick exact `provider/id` strings.
Bare ids resolve only when unique. Then print the table you resolved and use it.
| Tier | Used by | Pick |
|------|---------|------|
| Fast | recon, inventory, grep-shaped probes | cheapest capable, low or medium thinking. Default `ollama/deepseek-v4.1-flash:cloud`. |
| Strong | writers, integrator | best reasoning model authenticated here, high thinking. Prefer a `deepseek-v4-pro` class id if `models` lists one. |
| Review | reviewers, oracle | a **different family** from the writer that produced the diff. Model diversity catches different failure modes; it does not rescue an ambiguous prompt. |
If a tier cannot be resolved, say so and fall back to the session default rather
than inventing an id. Provider 429s return from that model; do not kill a rate
limited child, it keeps its context and recovers.
---
## 5. Concurrency: the numbers that actually bind
Defaults in this install (`pi-subagents` 0.70.0) are not 64.
-`globalConcurrencyLimit` defaults to **20** concurrent children per run. Set it
explicitly on each top-level call.
-`maxSubagentSpawnsPerRun` defaults to **64** cumulative admissions per run
tree, never refunded. Retries and fix passes spend it too.
- **Each wave is its own top-level run, so each wave gets its own budget.** This
is why the mission is split into waves rather than one giant script.
-`runs.lanes` is capped at 32 lanes, 16 stages per lane, 64 stages total.
# Worked example: archie-core control plane, September 2026
A real run, frozen partway through, kept verbatim so the shapes can be read
rather than re-derived. It is repository-specific on purpose: the value is in
seeing how much project knowledge a good brief carries.
**Its scripts are the snapshot's, not the current ones.** This directory was
captured mid-run, so the scripts in it predate fixes the skill's own lessons
describe — the typed-gate boolean trap, the post-fix re-gate and re-review, the
P2 handling, the build and lint checks in the gate.
`~/.agents/skills/high-throughput-programming/scripts/` and
`~/.agents/skills/high-throughput-programming/templates/` are normative; if this
directory disagrees with them, they win. Read the briefs, the lane plan and the
merge-train procedure here. Do not copy the scripts.
The method this run followed lives in the user-scope skill
`~/.agents/skills/high-throughput-programming/`; it is normative for method. This
repository's `archie-agent-fleet` skill is normative for facts about archie-core.
A run in another repository uses that skill's `templates/` plus its own filled-in
briefs — none of the archie specifics here transfer.
Seven tracker items, one shared shape, four lanes, a review pass after every
wave, a serial merge train.
| File | Note |
|------|------|
| `00-orchestrator.md` | The filled orchestrator prompt. Section 2 is the project's ground truth, section 5a the review-is-the-constraint doctrine, section 10 the review cadence. |
| `lanes.json` | Lane briefs carrying intent, traps and `file:line` premises. Read one to see the level of detail a brief needs. |
| `prompts/wave1.md` | The shared shape, plus an investigation whose verdict gated another lane. |
| `prompts/wave4-merge-train.md` | The serial merge procedure with the project's own hazards in it. |
| `agents/` | The three agent definitions with project invariants inlined. |
No scripts are copied here. This run's `wave0.js`, `wave2.js`, `review.js` and
`gate-evidence.sh` became `templates/recon.js`, `templates/lanes.js`,
`templates/review.js` and `scripts/gate-evidence.sh` in the user-scope skill;
those are normative, and this directory's stale copies were deleted so there is
exactly one of each to keep current.
What this run's Wave 0 actually caught, which is the argument for recon before
fanout: three of the seven items had premises that no longer matched the tree,
including one whose target file did not exist under the name the item used, one
whose anchor had moved commits earlier, and one whose scope could not reach the
clause it cited. All three would have produced confidently wrong lanes.
This is the committed copy of a real run. Its originals lived in
`/work/apps/archie-core/.pi/control-plane-run/`, which is gitignored, disposable
run state whose live copies may have moved on since. Nothing here is load
bearing at runtime.
The method is not here. The pipeline shape, the concurrency ceilings, the
pi-subagents traps, and the `scripts/` and `templates/` this file names all live
in the user-scope skill `~/.agents/skills/high-throughput-programming/`, and that
skill is normative for method. This copy is normative only for what the run
looked like on this repository; the archie-specific facts themselves live in the
parent `archie-agent-fleet` skill. A run in another repository uses that skill's
`templates/` plus its own filled-in briefs.
## Files
| File | What it is |
|------|------------|
| `00-orchestrator.md` | The prompt you give pi. It owns the waves, the ceilings and the verification rules. |
| *(the scripts)* | This run's `wave0.js`, `wave2.js`, `review.js` and `gate-evidence.sh` are **not copied here**: they live on as `templates/recon.js`, `templates/lanes.js`, `templates/review.js` and `scripts/gate-evidence.sh` under `~/.agents/skills/high-throughput-programming/`, which are normative. The snapshot's copies were stale, so they were deleted rather than duplicated. |
| `lanes.json` | Lane definitions: worktree paths, branches, beads, scoped test commands, briefs. Fill in the model id. |
| `prompts/wave1.md` | fwmp shape-first writer, and the xrux verdict probe. |
| `prompts/wave4-merge-train.md` | The serial merge procedure and the landing checks. |
| `prompts/wave5-eju6.md` | The end-to-end restart test. |
| `agents/cp-recon.md`, `agents/cp-writer.md`, `agents/cp-reviewer.md` | Project-scope agent definitions, as the run used them from `.pi/agents/`; these committed copies sit beside this file. |
description:Read-only recon on archie-core. Traces call sites, extracts spec clauses, inventories tests. Returns citations, never conclusions.
tools:read, grep, find, ls, bash
excludeTools:write, edit
acceptanceRole:read-only
completionGuard:false
inheritProjectContext:true
inheritGlobalContext:false
inheritSkills:false
thinking:high
systemPromptMode:replace
---
You are a read-only investigator in the archie-core Go repository. You measure; you do not decide.
Rules:
- Never edit, write, stage, commit, or run anything that mutates the tree. `bash` is for `git log`, `grep`, `go list`, `bd show`, and timing commands only.
- Every claim carries `file:line`. A claim without a citation is not a finding, it is a guess.
- Report facts. The orchestrator draws the conclusion. Do not recommend a course of action unless you were asked for one, and never close or reopen a bead.
- Grep first, then read only the lines that matter. Do not pull whole packages into context.
- Directory and bead names are not evidence of coupling. Check the imports.
-`ARCHITECTURE.md` and `CLAUDE.md` are stale by construction in this repo. The tree is the only evidence of current state; when a doc and the code disagree, report both and say which file you read.
- If your task's premise is false, say so plainly as your first line instead of answering the question you were asked.
Finish with your structured output. Keep prose under 40 lines; long inventories belong in your output file.
description:Read-only adversarial reviewer for one archie-core lane and one angle. Evidence-labelled findings and a single merge verdict.
tools:read, grep, find, ls, bash
excludeTools:write, edit
acceptanceRole:read-only
completionGuard:false
inheritProjectContext:true
inheritGlobalContext:false
inheritSkills:false
thinking:high
systemPromptMode:replace
---
You review one lane of archie-core work from one angle. You did not write this code and you do not fix it.
Start from `git diff main..<branch>` and `git diff --stat main..<branch>`. Review the diff, never the writer's transcript: the transcript costs context and carries almost no signal.
What you are looking for, in order:
1. Behaviour the change dropped while keeping the shape. Refactors lose guards. Read every new or changed doc comment: one that describes a silent fallback is usually a confession.
2. A claim in the diff that the code does not support.
3. A test that restates an assignment or a constant instead of failing for an interesting reason.
4. Two sides that must agree and have no test tying them together.
Rules:
- Read-only. Do not edit, stage, commit, or fix. Propose the fix in words.
- Every finding carries `file:line` and a quoted proof.
- Label by evidence, not by how bad it sounds: P0 breaks a user-reachable path or an invariant, P1 is a real defect with a bounded blast radius, P2 is worth fixing but not now.
- "No finding" is a valid and useful answer. Do not manufacture findings to look thorough.
-`task check` passing is not evidence of correctness: it cannot see a field the server stopped sending, because optional chaining makes a dead dashboard binding typecheck.
End with exactly one line: `Merge verdict: BLOCK`, `Merge verdict: OK`, or `Merge verdict: OK with notes`.
description:Implementation worker for archie-core lanes. Red-green TDD in an isolated worktree, package-scoped gate, no suppression.
tools:read, write, edit, grep, find, ls, bash
acceptanceRole:writer
inheritProjectContext:true
inheritGlobalContext:false
inheritSkills:false
thinking:high
timeoutMs:5400000
systemPromptMode:replace
---
You implement one lane of work in the archie-core Go repository, inside your own git worktree.
Open every run by printing `pwd`, `git branch --show-current` and `git status --short`, and repeat all three in your final report. A worker that finishes in the wrong checkout looks exactly like one that did nothing.
Method:
1. Read the bead with `bd show <id>`, then `CLAUDE.md` and `docs/architecture/organisation.md`.
2. Red: write the failing table-driven test first. Run it. Paste the failure. Confirm it fails on an assertion, not a compile error. A test that cannot fail for an interesting reason is noise in the gate.
3. Green: the minimal implementation that satisfies the test.
4. Run your lane's scoped test command. Never run `task check`: it saturates the machine and the merge train owns it.
5. Commit on your lane branch with a conventional-commit subject scoped by package (`feat(controlplane): ...`).
Hard rules:
- Fix invalid state at the producer, not with a defensive check at the consumer.
- Never suppress: no `//nolint`, no `t.Skip`, no build tag that hides a failing test, no deleted assertion. If a lint is wrong, leave it failing and say why.
- Adopt `task fmt` output verbatim. Never revert a formatter or linter diff.
- Two failed fixes on the same logic block means you rewrite the block, not patch it a third time. Prefer a clean 20-line rewrite over a 5-line band-aid.
- Dependency flow is `cmd -> app -> {domain, infrastructure}`, with infrastructure implementing domain contracts. Nothing in `internal/webui` may reach `internal/domain/workflow`.
- Do not widen scope. Work not asked for is a finding to report, not work to do.
- Do not merge, do not push, do not touch `.beads/`, do not edit the main checkout.
- Scratch files live in `/tmp`. Never in the working tree.
- If the bead describes a world the tree no longer has, stop and report that instead of implementing it.
Your final report states: the commit sha, changed files, the scoped test command and its result, what you deliberately did not do, and any residual risk.
"test":"go test ./internal/app/controlplane/... ./internal/domain/applystatus/... -count=1 && go vet ./internal/app/controlplane/... ./internal/domain/applystatus/...",
"brief":"Wave 0 and its claims audit corrected this bead's premise, and the correction is the work. There is not one live apply path, there are two, and the PRD clause (Archie starts and checks a replacement before switching, and if the check fails the old one keeps running) applies to both. (1) workflow-execution-settings is applied on a watch (internal/app/archied/control_plane.go:94) and reports apply status at :118. (2) personas is also watched and applied live in the same process (internal/app/archied/gateway_runtime.go:37 watch, :79-86 apply) and reports NO apply status at all, so personas is the live-watched kind that widens this bead. Correction to the earlier version of this brief: workflow-definitions is not applied by a daemon watch, but do not read that as \"no watch anywhere\" -- the webui streams it at internal/webui/api_control_plane.go:139, which is a generic SSE passthrough for any kind. That is a read path, not a component-replacement path, so it does not widen nwa0. What the audit also established: the hard-coded nil at control_plane.go:118 is inert (no path in applyWorkflowExecutionSettings can fail), so do not build the bead around \"the report path cannot carry a rejection\"; that framing is wrong. Order of work: add the build-and-probe step to the live apply path, retain the previous component when the check fails, and report the failure through the apply-status surface. Decide explicitly whether personas gets the same treatment in this bead or a follow-up bead; if it is a follow-up, file the bead rather than half-wiring it. Do NOT fix the watch-reconnect defect opportunistically: it is filed separately as archie-core-yrmr, and a defect found by a review pass must not be silently repaired inside another lane. Apply status is on the State Store contract, not the control plane: PutApplyStatus/ListApplyStatus are administrative, keyed on (process, kind), replaced in place, re-stamped every 30s, stale at 90s, and a stale record renders as \"Not reporting\", never as current. applystatus.New refuses a process name Processes() does not list, deliberately: an invented name would read as a process that is not running, which the PRD blesses as legitimate, so the failure would be invisible."
},
{
"key":"recovery",
"dir":"/work/apps/cp-recovery",
"branch":"cp/recovery",
"beads":[
"archie-core-6zw0"
],
"test":"go test ./cmd/... ./internal/infrastructure/staterpc/... -count=1 && go vet ./cmd/...",
"brief":"DECIDED: subcommands of cmd/archie-state-store (backup, restore, validate, rollback). Not a new binary. Sam's standing rule, restated 2026-09-21 and now recorded in docs/architecture/organisation.md#process-boundaries: a cmd/ entry is a process boundary, earned only when a surface fails independently of the rest of the fleet or when that process may need to run in more than one location (HA pair, NAT traversal, separate host). Operational commands over a surface an existing binary already owns are subcommands of it. Do not reopen this. Two premise corrections from Wave 0 that change the work. First, the file is <dir>/archie.db-tasks.sqlite (cmd/archie-state-store/main.go:290-292, asserted at main_test.go:435-439), not archie.db, so a command that operates on 'archie.db' by name operates on nothing. Second, part of this already exists in shell: scripts/archie-update-install:189 takes a sqlite3 .backup of the task database and describes it as the watchdog's only route back from a forward schema migration. That makes this bead partly consolidation. The subcommand becomes the one authoritative implementation and the install script calls it, rather than a Go path and a shell path that drift apart. Changing that script is in scope for this lane; the watchdog's refusal semantics (an update that cannot back up must not start) must survive the change unchanged. The command operates on the database file directly with the State Store stopped, refuses to run against a live store, and adds no rollback RPC: a revision carries its value and restoring replays it through the ordinary replace."
},
{
"key":"steps",
"dir":"/work/apps/cp-steps",
"branch":"cp/steps",
"beads":[
"archie-core-8szi"
],
"test":"go test ./internal/domain/workflow/... ./internal/app/agentworker/... -count=1 && go vet ./internal/domain/workflow/...",
"brief":"internal/domain/workflow/steps.go:215 and :227 hard-error on legacy .archie/stages/*.go and .archie/gate.go and tell the operator to migrate to a registered YAML workflow step, but BuiltinStepRegistry() only exposes the six shipped workflows' own stages, so there is nothing to migrate to. Identify what the removed hooks actually did and land the equivalent as registered step types. This lane starts only after archie-core-fwmp has merged, and registers against the extension point fwmp created. Do not re-open the registry design."
},
{
"key":"config",
"dir":"/work/apps/cp-config",
"branch":"cp/config",
"beads":[
"archie-core-xrux",
"archie-core-i3qm"
],
"test":"go test ./internal/infrastructure/configuration/... ./internal/app/archied/... -count=1 && go vet ./internal/infrastructure/configuration/... ./internal/app/archied/...",
"brief":"Two beads in order, one package owner. First archie-core-xrux. The verdict is already measured with evidence (Wave 0R claims audit c6) and it is ZEROES: the -config-overlay file path silently drops every field a partial map-valued entry omits, which is exactly the archie-core-e2e2 hazard, and it is user-reachable because deployments/dev.toml is the documented -config-overlay argument and sets [services.state] target/listen, while the base config.toml is where [services.state].target_token lives -- so the overlay drops the token. The red stage is a committed characterization test through the production entry point (Loader.Resolve / -config-overlay) that loads a config with a populated map-valued entry, overlays a file setting one sibling key, and asserts the omitted keys survive; it fails today. Then move apply.go's foldOverrides (apply.go:60) onto the file overlay path (loader.go:161-194, decode at :176) so it passes. Do NOT delete apply.go, apply_test.go or Loader.ApplyOverlay: the hazard they were written for is live on that path. No dotted-path field merge is wanted beyond this guard, because the control plane replaces whole documents. Then archie-core-i3qm, whose anchor and scope the audit corrected. control_plane.go:13 is a blank line (the doc comment is :14-18); the calls moved to :20 (RuntimeConfig) and :27 (configuration.Validate) in 9accf112. More importantly the PRD clause names State Store startup, and state_store.go:75-104 never calls runtimeConfig: it reaches Loader.finalize via bootstrap.go:263 (the loader.Resolve call site, not finalize itself) and loader.go:341-346, where Validate runs. Scope correction: that file-only Validate runs before loadRuntimeConfig for ALL THREE binaries (main.go:358, gateway.go:61, state_store.go:78), so it is not state-store-specific; and a value that is valid alone but invalid only after the DB merge never blocks the state store at all, because it is imported unvalidated at state_store.go:104 and fails later in the daemon's loadRuntimeConfig (control_plane.go:27). Reduce the bootstrap document to the fields the PRD lists (database path, listen addresses, credentials, TLS, encryption-key references) and stop validating the migrated surface at startup, so a stale TOML value in a database-owned field cannot fail boot. boot.runtimeConfig is the one layering call and the SIGHUP callback makes the same call: if you add a database-owned layer, add it there and nowhere else."
Serial. You run this yourself in the captain checkout at
`/work/apps/archie-core`. No subagent owns `main`, and only one `task check`
exists at a time.
Order: `cp/shape` (already merged in Wave 1), then `cp/config`, `cp/live`,
`cp/recovery`, `cp/steps`. Config goes early because it owns the bootstrap path
the others boot through.
## Per branch
```bash
BR=cp/live
git -C /work/apps/archie-core status --short # must be clean
git merge-base --is-ancestor main $BR&&echo"stale: rebase required"
git log --oneline main..$BR
git diff --stat main..$BR
```
A branch that predates a merge computed its deletions against code that has
since changed. On this repo a stale branch's diff deleted 460 lines of
`internal/config` that read as tidy relocation and would have reverted another
lane's decomposition. Rebase it or re-derive the work. Never merge a diff whose
deletions were computed against code that has moved.
Then:
1.`git merge --no-ff $BR` (or apply the lane's handoff patch if the lane ran in
a managed worktree).
2.`task build --force`, then `task check`, once, alone. Nothing else runs on this machine while it does. The force-build is required until archie-core-hhgw lands: `task build`'s sources are Go-only (Taskfile.yml:325), so a ui/dist-only change does not retrigger it and a stale embedded dashboard would ship (Wave 0R audit c10).
3. On failure: one fix pass back to that lane's retained writer with the real
output pasted in, not a summary. On a second failure, `git reset --hard` the
merge, requeue the lane, and move to the next branch. Do not stack a third
patch, and do not fix it yourself unless the fix is one line and obvious.
4. Commit generated assets in the same commit. `ui/dist/` and schema outputs are
LAW: never regenerated away, never reverted, never left out.
5.`bd close <id>` for each bead the branch delivered. Do not stage `.beads/`,
and never create a commit whose only content is beads bookkeeping.
## Landing check, every time
```bash
git log --oneline -3
git branch --no-merged main
git log --oneline origin/main..main
```
Done has three states: no commits, committed and unmerged, merged. Only the
third counts. A closed bead is what a worker believed, not what landed.
## Your own edits
A coordinator `sed` rename on this repo once produced `&fakeStore{fakeStore{` in
six places and broke the build. Your edits get the same gate as the children's,
and nobody else reviews them.
## Do not push
Sam pushes manually and does not always announce it. Report what is unpushed as
fact. If `git log origin/main..main` is long, say how long; do not act on it.
containers, or process boundaries; use it when deciding where new code
belongs, enforcing dependency direction, separating current runtime truth
from the approved target and open migration decisions, or ensuring every
behavior has one authoritative path. Route proof of duplication, dead-code
disposition, production reachability, and maintainability to
archie-technical-accountability.
---
# Archie Architecture Contract
Treat architecture as executable safety policy. Preserve one understandable
owner and one production path for each behavior.
## Read status before code
| Label | Meaning | Authority |
| --- | --- | --- |
| **CURRENT** | Behavior present in live code and production composition as of 2026-09-18. | Code, tests, and `internal/app/archied` wiring (`cmd/archied/main.go` is a thin dispatcher) |
| **APPROVED TARGET** | Direction an implementation must approach, but which may not exist on disk. | `docs/prds/01-project-management.md` and documents whose status says approved |
| **OPEN** | A migration or API decision no implementer may invent locally. | `docs/architecture/migration-decisions.md` and documents marked in progress or under design |
> **Do not implement target prose as though it describes current code.**
> Before treating a target package as available, prove that it exists and is
> used from a production entry point. As of 2026-09-18 `internal/domain/`,
> `internal/eventbus/`, `internal/infrastructure/`, and `internal/app/` exist;
> `internal/policy/` does not, and `internal/domain/{agent,identity}` remain
> APPROVED TARGET only.
Resolve apparent disagreement in this order:
1. Read live code and production composition for CURRENT behavior.
2. Read `docs/prds/01-project-management.md` for APPROVED TARGET ownership.
3. Read the focused decision document for the selected behavior.
4. Read `docs/architecture/migration-decisions.md` for OPEN work.
5. Stop and use `archie-architecture-planning-campaign` if a required semantic
decision remains open.
Route to `archie-domain-reference` for glossary and
`archie-config-and-flags` for config enumeration.
Two skills this document routes to are parked outside this checkout, under
`/work/apps/archie-skills-parked/`: `archie-technical-accountability` and
`archie-architecture-planning-campaign`. If your session has not loaded them,
treat each routing target as a manual escalation step rather than a live skill.
Also: `cmd/archied/main.go` is a thin dispatcher; the wiring lives in
`internal/app/archied/`.
## Know the CURRENT system
Do not simplify these facts into the target model:
| Concern | CURRENT runtime truth on 2026-09-18 | Evidence |
| --- | --- | --- |
| Composition | `cmd/archied/main.go` dispatches to `internal/app/archied.Run()`, which performs construction and wiring in `bootstrap.go`. | `cmd/archied/main.go`; `internal/app/archied/` |
| Workflow | `internal/domain/workflow` routes a `task.Task` into a `map[string]Workflow`, mutates a broad `TaskContext` through sequential stages. | `internal/domain/workflow/workflow.go` |
| Agent-stage boundary | Versioned `agentexec.Request`/`Result` carries one autonomous stage; validation correlates task, attempt, and stage. | `internal/agentexec/protocol.go` |
| Container handoff | `internal/taskrun` carries entire task plus `config.Repo` and `config.TaskConfig`; `internal/app/agentworker` owns routing and sequencing while its NATS adapter owns wire mechanics. | `internal/taskrun/taskrun.go`; `internal/app/agentworker/`; `internal/infrastructure/agenttransport/nats/` |
| Enforcement | Gates, read-only/protected paths, TDD inverted test gates, and diff caps are represented outside prompt prose. | `internal/gate/`; `internal/domain/workflow/{agent,tdd,steps}.go` |
| Configuration | `internal/config.Config`, `IdentityConfig`, `Repo`, and task snapshots mix input decoding with runtime concerns. Decoding itself lives in `internal/infrastructure/configuration`. | `internal/config/config.go`; `internal/infrastructure/configuration/` |
| Identity | Configured names and bot usernames act as process-local identity keys. There is no durable Identity domain. | `internal/daemon/daemon.go`; `internal/domain/storecontract/storecontract.go`; `internal/gateway/session.go` |
| Messaging | `internal/gateway` contains both the `Message` struct flow and richer `MessageEvent`; channel routing and task control are mixed with conversational behavior. | `internal/gateway/{gateway,messageevent,tasks}.go`; `internal/channels/` |
| Plugins | `plugin.Plugin` exposes only `Name` and `Version`; current loading interprets operator-installed Go files with Yaegi. | `internal/plugin/plugin.go` |
| Processes | Agent modes include in-process, subprocess, and NATS. Optional containers add a distinct boundary with known gaps. | `internal/config/config.go`; `internal/app/archied/`; `docs/architecture/organisation.md` |
### Interpret the current lifecycle honestly
Use these CURRENT status values:
```text
queued, running, waiting_human, pr_open, merged,
parked, dead, rejected, closed_wont_do
```
The intended flow includes queue/claim, workflow stages, human wait/resume, PR
reconciliation, parking/retry/exhaustion, and crash recovery. Read
`internal/domain/workflow/task/task.go`, `internal/daemon/daemon.go`, and
`internal/domain/workflow/workflow.go` before changing a transition.
`Store.Transition(ctx, taskID, from, to, detail)` now guards on `from`
(`WHERE id=? AND status=?`, returning `store.ErrStaleTransition` on mismatch)
and runs the status update plus the transition-history insert in one
transaction (`internal/store/store.go`). The sentinel crosses the State Store
gRPC boundary via `mapError`/`unmapError` in
`internal/infrastructure/staterpc/values.go`; its canonical message string is
part of the wire contract. Earlier non-atomic behavior is the settled fix,
not an open design.
## Preserve the load-bearing invariants
| Invariant | Required action | Status and source |
| --- | --- | --- |
| The model never runs git | Keep clone, branch, commit, push, diff, and cleanup in deterministic workspace/worktree steps. | CURRENT: `docs/architecture/agent-system.md`; `internal/worktree/` |
| Deterministic constraints outrank prompts | Enforce gates, protected paths, read-only stages, test protection, and change caps outside model instructions. | CURRENT: `docs/architecture/agent-system.md`; `internal/gate/`; `internal/domain/workflow/` |
| Agent execution is a data boundary | Send bounded, versioned input; validate correlated output before applying it. | CURRENT foundation: `internal/agentexec/protocol.go`; `docs/architecture/agent-system.md` |
| Every workflow ends explicitly | Preserve terminal outcome or visible park. Preserve crash recovery of interrupted `running` work. | CURRENT: `internal/domain/workflow/workflow.go`; `internal/store/store.go` |
| Generic plugins stay metadata-only | Keep `plugin.Plugin` at `Name()`/`Version()`. Behavior on typed capability interface with owning `Registry`/`Manager`. | CURRENT-enforced rule: `internal/plugin/architecture_test.go` |
| Capability engines own lifecycle | Give resource-owning engines explicit start/health/stop semantics and failure isolation. | APPROVED rule: `docs/architecture/plugins-and-extensions.md#plugin-engine-rule-strict` |
| Trust is explicit | Treat trusted operator-installed in-process code, repository code, out-of-process integrations, and container-isolated code as different trust classes. | APPROVED rule: `docs/architecture/plugins-and-extensions.md#plugin-engine-rule-strict` |
| Admission and deterministic routing of proposed durable work | `internal/domain/workintake` | Emit an accepted request; do not construct execution state. |
| Capability-specific plugin behavior | Owning domain's typed registry/manager | Never add behavior to `plugin.Plugin`. |
| Broker-neutral publication/subscription mechanics | `internal/eventbus` | Keep message meaning and schemas with their domain. |
| Shared policy evaluation/evidence mechanics | No current package. `internal/policy` was the planned location; as of 2026-09-18 policy lives inside playbook bindings (`playbooks/`, `internal/domain/eda/playbook`) and `internal/gate/`. | Keep policy vocabulary, evaluators, and consequences with consuming domain. |
| Construction, cross-domain connection, startup/shutdown | `internal/app/archied` or `internal/app/agentworker` | Keep `cmd/*` thin; define health and shutdown order. |
| Deploy assembly | `deployments/<assembly>` | Do not move application behavior into deployment files. |
| Unreviewed memory/tools/workspace/gate/storage/web/RPC/scheduling | **OPEN** | Run `archie-architecture-planning-campaign`. |
## Confront known weak points
| Weak point on 2026-09-18 | Required response |
| --- | --- |
| `TaskContext` is a mutable service bag with config, services, policy, scratch state. | Design narrow step inputs and staged removal. |
| Workflow lifecycle split across store, daemon, workflow, gateway, worker. | Trace every writer and reader before changing status. |
| State changes and transition history were non-atomic and `from` was advisory — **settled** in `internal/store`: `Transition` guards on `status=?` and writes status plus history in one transaction. | Keep every status writer behind `Transition`; do not reintroduce a raw `UPDATE tasks SET status`. |
| In-process and container paths put orchestration on different sides of process boundary. | Decide which path survives before extending both. |
| Container RPC uses root forge/worktree, not task owner's identity. | Known trust/correctness defect — not identity-isolated. |
| Missing `task.json` makes `archie-agent` join shared queue. | Fail closed before treating as isolated. |
| Subprocess uses daemon user and host access. | Not a security boundary. |
| Gateway formerly duplicated lifecycle strings, competing message contracts. | No third contract or direct lifecycle mutation path; status constants live in `internal/domain/workflow`. |
| Global config and `IdentityConfig` combine unrelated owners. | Don't rename global structure or add `Extra` map. |
| Memory has fixed scope requirements but OPEN final placement/migration. | Preserve scope isolation; focused design before moving. |
| Tests can make unused/duplicate code appear legitimate. | Prove production reachability from composition. |
description:Recreate, inspect, and troubleshoot Archie Core's development, build, test, documentation, and container toolchains. Use when onboarding a checkout; diagnosing Go, Task, golangci-lint, gofumpt, Docker/Compose, NATS, GPG, cache, temporary-directory, listener, or network failures; comparing local work with repository automation; or proving which build surfaces a command actually covers. Load this before running task check in an unfamiliar or restricted environment because that gate rewrites files and omits several independent surfaces.
---
# Build and verify the Archie environment
Recreate the environment as independently verified surfaces. Do not turn a
passing root-module command into a claim that the tools module, documentation
site, race detector, linter, or container images also passed.
All volatile observations are snapshots from **2026-09-18** (HEAD `2e1e1549`).
env GIT_CONFIG_GLOBAL=/dev/null go test ./internal/worktree/... ./internal/worktreerpc/... -count=1
```
## Use the complete validation matrix
| Evidence | Command | Current snapshot |
|---|---|---|
| Focused Go behavior | `go test ./pkg/... -run '^TestName$' -count=1 -v` | Use first. |
| Root unit/integration suite | `go test ./... -count=1` | Restricted sandbox fails listener-dependent packages. |
| Root race suite | `go test -race ./... -count=1` | Not run by `task check`. |
| Vet | `go vet ./...` | Passed on 2026-09-18. |
| Lint | `golangci-lint run ./...` | Not re-run on 2026-09-18; a focused `--enable-only=dupl ./internal/...` run reported 0 issues. Re-run before quoting a total. |
| Build | `go build -o /tmp/... ./cmd/archied` and `cmd/archie-agent` | Both passed on 2026-09-18. |
| Tools tests | `go -C tools test -mod=readonly ./... -count=1` | Passed on 2026-09-18. |
| Generated contract parity | Temp docsgen output + `cmp --silent` | Passed for 11 schemas on 2026-09-18, after regenerating a file stale since `4b340d2b`. |
| Container build | `task docker-build` | Not verified in restricted environment. |
| Repository gate | `task check` | See `archie-diagnostics-and-tooling` for the dated snapshot. |
description:"Trace Archie behavior and blast radius through Go source, types, state, persistence, transports, consumers, tests, configuration, production composition, and target architecture. Load before changing or planning a non-trivial feature, refactor, config field, interface, persistence path, workflow, channel, plugin, or agent execution path; also load to investigate duplicate behavior, hidden dead code, constructor bypasses, package dependencies, decoded-but-unwired configuration, or uncertainty about what a symbol actually affects."
---
# Discover the Archie codebase
Use evidence from the current checkout to explain a behavior before changing it.
Volatile tool facts below were verified on **2026-09-18**.
description:Trace, add, rename, deprecate, or debug Archie configuration and command-line flags from external input through defaults, validation, overlays, environment and secret handling, worker snapshots, deployment passthrough, and the production consumer. Use for internal/config, config.example.toml, deployments/*.toml, docker-compose.yml, archied or archie-agent flags, multi-identity settings, mode-parity questions, and reports of a setting that parses but has no effect.
---
# Trace Archie configuration and flags
Treat configuration as a dataflow, not as a struct inventory. Prove every
claimed setting has an input, normalization path, composition seam, and runtime
consumer.
Current evidence date: **2026-09-18** for the matrix below. Entries added later
carry their own date inline.
Use these status terms exactly:
| Status | Meaning |
| --- | --- |
| **production-wired** | A real entrypoint decodes or accepts the value and a runtime consumer uses it. |
| **partially-wired** | Some modes, scopes, or fields consume it, but parity is incomplete. |
| **test/library-only** | An API and tests exist, but no current binary selects it. |
| **decoded-but-unwired** | Decoding/defaulting succeeds, but no production consumer uses the effective value. |
| **external-production-unknown** | The repository does not contain the deployed effective value. |
Never upgrade a status merely because decoding tests pass.
## Trace one setting before editing it
1. Find every external spelling, Go field, flag, environment name, example, and
deployment reference.
2. Identify the selected loader or flag set.
3. Read `finalize` and any consumer-side defaults.
4. Follow copies across `ForTask`, `ToConfig`, NATS messages, subprocess
env selection, container env construction, and identity overlays.
5. Find the production composition site and final behavior-changing read.
6. Find tests for decoding, defaulting, invalid input, production composition,
and mode parity.
7. Check `config.example.toml`, `deployments/*.toml`, `docker-compose.yml`, and
| `archied -config PATH` | Defaults to `$XDG_CONFIG_HOME/archie/config.toml`, or `$HOME/.config/archie/config.toml`; `internal/app/archied/bootstrap.go` builds `configuration.New(log)` and calls `Loader.Resolve`. | production-wired |
| `archied -config-overlay PATH` | Resolves a file or directory overlay through the same loader. Omitted overlay fields retain base values. This is the only overlay: the dashboard runtime overlay and its SQLite store were deleted when the control plane took over settings writes. | production-wired |
| `configuration.Loader.Dir(base, overlay)` | Supports main YAML/TOML plus feature YAML and `conf.d`; no current entrypoint calls it. | test/library-only |
| `config.Load(path)`, `config.LoadDir(...)` | Removed. The old `internal/config` package-level helpers no longer exist; decoding is `Loader`-based. | not applicable |
| `config.example.toml` | Load-tested example, not a deployed configuration. | test/library-only |
| `deployments/docker-nats-stack.toml` | Complete host-daemon configuration for the Compose-managed NATS service. It is copied into the operator's config directory; Compose does not mount it. | supported-example |
| Operator config and environment | Lives outside the repository; contents are deployment-specific. | external-production-unknown |
Both TOML and YAML decoding are non-strict at the field level. Add explicit
compatibility and typo tests; never use "the file loaded" as evidence that a
key took effect.
A registered service client always resolves to a non-empty target, so
`Services.Get(name).Target != ""` proves nothing. `RegisterService` in
`internal/config/servicespec.go` supplies the fallback (`127.0.0.1:9090` for
the State Store, `127.0.0.1:8585` for the Gateway), which means a guard written
as "only dial when configured" dials always, and a test that sets no target
reaches for a real process on the developer's machine. Gate on an explicit
flag or on the dial succeeding, and give a binary its own
`-<service>-target` flag so tests can point it at a fake.
Do not expose these helper flags as daemon settings.
## Read the current wiring matrix
### Root daemon and capability settings
| Keys | Default, validation, and consumer | Status |
| --- | --- | --- |
| `work_dir`, `db_path` | Derive from `$XDG_DATA_HOME/archie`, else `$HOME/.local/share/archie`; explicit `~` paths are home-expanded. `db_path` is a prefix: tasks/events use `<db_path>-tasks.sqlite` and conversations use `<db_path>-conversations.sqlite`. | production-wired |
| `skills_dir` | Empty falls back to `work_dir` for startup workflow registry. | partially-wired |
| `models.<role>` | Workflow stages read requested role then fall back to `builder`; triage judge falls back `triage` to `planner`. | production-wired |
| `agent.mode` | Default `nats` when containers enabled, otherwise `inprocess`; validates `inprocess`, `subprocess`, or `nats`. | production-wired |
| `agent.command`, `agent.env` | Command defaults `archie-agent`; env entries must be nonblank names without `=`. | partially-wired |
| `budgets.max_steps`, `max_tokens`, `wall_clock`, `gate_max_failures` | No loader defaults; `Budgets` documents zero as disabling. | production-wired |
| `diff_cap_lines` | Zero replaced by `400` in `finalize`; `StageDiffCap` treats `<= 0` as disabled. TOML zero cannot disable; negative value does. | production-wired |
| `tools.mcp_servers` | `internal/app/archied` registers daemon-side MCP providers. Empty transport becomes `stdio`; only `stdio` accepted. `url` decoded but unused. | partially-wired |
| `indexing.index_dir`, `indexing.db_path` | `finalize` derives paths under `work_dir`; no entrypoint constructs `internal/indexing.Manager` (the exported `NewManager` exists but has no production caller). | decoded-but-unwired |
| `extra` / unknown `conf.d` values | Test/library-only `Loader.Dir` stores untyped data; no core production consumer. | decoded-but-unwired |
| `[identities.forge].intake`, `.webhook_secret`, `.webhook_addr` | 2026-09-22: these parse because `IdentityConfig` embeds `Forge` (`internal/config/config.go:573`), while every read is the root `[forge]` block (`validate.go`, `defaults.go`, `bootstrap.go`). Wiring them is the intake migration, tracked as `archie-core-1786637497036-275-8838629e`. | partially-wired |
**Three shapes of an unwired field.** All three read as working from the file
alone, and only the first two are defects - so establish which shape you are
looking at before reporting one:
1.**not-consumed.** Decoded and normalized, but no production consumer uses the
effective value (`memory.provider` and `indexing.*` above; per-identity intake
was this shape until 2026-09-22, when the configuration was made to reject it
rather than accept it).
2.**not-projected.** A read exists, but at a layer that does not own the
effective copy, so editing the wrong layer does nothing. Direction matters as
much as presence: for most `[chat.*]` keys the stored resource outranks the
file, so writing a new file value is a no-op once a resource exists. A file
key in that position is a **seed**, not the contract.
3.**deliberately-not-projected.** File-only by design and therefore
indistinguishable from a dropped field to an auditor unless the projection
says so in a comment. `runtimeChatConfigFrom` reads
`Telegram.UpdateCheckCommand`/`UpdateInstallCommand` from `base` rather than
from the stored resource, on purpose. Check for that comment before filing a
defect.
The default `agent.command = "archie-agent"` is not verified subprocess
operation. `SubprocessRunner` expects one JSON invocation on stdin and one JSON
response on stdout; `cmd/archie-agent` is a long-running NATS worker.
### Repository settings
| Keys | Effective behavior | Status |
| --- | --- | --- |
| `owner`, `name` | Required for every declared repo. Single-identity config with zero repos loads but polls nothing. | production-wired |
| `base` | `BaseBranch()` maps empty to `main`, but `daemon.process` pre-clones with raw `repo.Base`. Set it explicitly. | partially-wired |
| `gate` | Argv arrays run in order. Empty entries skipped. TDD inverts last non-empty command as repro test by convention. | production-wired |
| `protect` | Path suffixes enforced by agent runner; not prompt-only rule. | production-wired |
| `ecosystem`, `preflight`, `test_glob` | Resolved preflight/test-glob treats empty ecosystem as Go. Container storage receives raw ecosystem. Go/Python/Node/Rust have defaults; `custom` or unknown yields none. | partially-wired |
| `persistent_storage` | Controls Docker-backed per-repo volume setup; no equivalent without container storage. | partially-wired |
| `max_retries` | Values greater than zero override global; zero or negative falls back to global. | production-wired |
| `allow_concurrent` | Root repo entries affect dispatcher. `allowConcurrentFor` does not inspect identity repo lists. | partially-wired |
description:Project-specific symptom-to-evidence triage for archie-core. Load this skill when Archied hangs, parks a task, loses or duplicates work, cannot reach NATS or an agent container, rejects configuration or secrets, shows stale Telegram or dashboard state, loses streamed text, fails MCP startup, reports SQLite state surprises, degrades an optional feature, or when Go tests disagree between a sandbox, editor, CI, and the host. Use it to separate environment failures from code regressions and to choose the next exact diagnostic.
GIT_CONFIG_GLOBAL=/dev/null go test ./internal/skillscript \
-run '^TestRunWrapsExternalCommand$' -count=1 -v
```
## Triage NATS request/reply and JetStream
| Surface | Subject or resource | Bound/current behavior |
|---|---|---|
| Task discovery | `archie.task.>` in `ARCHIE_TASKS` | Work-queue retention; daemon durable `archie-daemon`; max deliver 3 |
| Per-stage agent request | `archie.agent.<task>.request` | Reply inbox in `X-Archie-Reply`; wall-clock budget or 30m |
| Full task handoff | `archie.taskrun.<task-id>` | Core request/reply; no-responder retry 20s every 250ms |
| Store RPC | gRPC State Store (`internal/infrastructure/staterpc`) | Client timeout 60s (`rpcTimeout` in `internal/app/agentworker/worker.go`); task-scoped grants for Update/Transition/InsertEvent only |
| Forge RPC | `archie.forge.*` | Error travels in a JSON envelope |
description:"Measure Archie codebase maintainability, Go package dependency shape, configuration consumption, production composition, test and delivery-gate drift, tracked-artifact hygiene, coverage, races, and runtime evidence. Load when establishing a dated baseline, finding large or complex functions, investigating duplicate or dead-path candidates, checking whether configuration reaches an entrypoint, comparing architecture before and after a refactor, or replacing an eyeballed quality claim with reproducible numbers."
---
# Measure Archie instead of eyeballing it
Collect evidence before judging quality. Keep collection read-only, save raw
output, state what each metric cannot prove.
Volatile facts and numeric snapshots below were verified on **2026-09-18**
(HEAD `2e1e1549`).
Route to `archie-codebase-discovery` for semantic traces,
`archie-config-and-flags` for config enumeration,
`archie-debugging-playbook` for live failures.
## Define the measurement terms
- **Baseline:** dated raw output tied to a commit, toolchain, command, and
environment.
- **Candidate:** a machine-found item requiring semantic confirmation.
- **Production composition:** concrete construction selected by a shipped
description:Maintain Archie's documentation of record and write durable architecture decisions, migration plans, parity matrices, incident and dead-end records, feature ownership and deprecation records, operational runbooks, and documentation reviews. Use when deciding where an Archie fact belongs; reconciling code with `CLAUDE.md`, `docs/architecture`, `docs/prds`, `docs/archive`, or generated contracts; changing `tools/docsgen`; documenting a feature so future maintainers can find its owners, consumers, invariants, superseded paths, deletion gates, evidence, and rollback; or checking documentation authority, drift, links, copied content, and source-artifact hygiene.
---
# Maintain Archie documentation
Write one durable record for each decision or behavior. Separate what runs now
from what Archie has approved as its destination.
Route to `archie-architecture-planning-campaign` for ownership/boundary
decisions (parked outside this checkout, under
`/work/apps/archie-skills-parked/`),
`archie-architecture-contract` for invariants,
`archie-codebase-discovery` for live entry points,
`archie-failure-archaeology` for incidents,
`archie-config-and-flags`, `archie-build-and-env`, or `archie-run-and-operate`
for runtime/operations facts.
## Use the authority vocabulary
Define a **record of authority** as the one canonical location whose owner may
change a claim.
| State | Meaning | Permitted wording |
|---|---|---|
| `CURRENT` | Verified behavior in checked-out code, tests, composition, or executable config | "Currently does" |
| `APPROVED TARGET` | Normative destination approved in architecture index | "Must become"; never "currently does" |
| `OPEN` | Investigation, candidate, or unresolved decision | "Candidate", "unknown", or "requires decision" |
| `HISTORICAL` | Prior design, incident, dead end, or superseded choice | "Previously did" |
| `GENERATED` | Derivative output produced from owned source definition | "Generated from"; never hand-edit |
| `EXTERNAL` | Fact held outside repository, such as deployed config or host state | Date, name verifier, give re-check command |
When `CURRENT` conflicts with `APPROVED TARGET`, preserve both and state the
migration delta.
## Use the repository authority map
Verified on 2026-09-18:
| Location | Role | Discipline |
|---|---|---|
| Live Go code, tests, `Taskfile.yml`, executable config parsing, composition under `internal/app/` (entered from `cmd/`) | `CURRENT` execution evidence | Trace producers and consumers; tests prove only asserted behavior |
| `CLAUDE.md` | Current contributor and safety protocol plus compact architecture orientation | Verify operational claims against code and `Taskfile.yml`; `AGENTS.md` is a symlink to it |
| `docs/prds/01-project-management.md` | Index and approved foundation for target architecture | Add or change target decisions in the focused document it names |
| `docs/architecture/*.md` | Focused target decisions, active review procedure, migration inventory | Read each file's status |
| `docs/architecture/migration-decisions.md` | `OPEN` migration inventory constrained by approved decisions | Close a question only after code-grounded review |
| `docs/archive/` | `HISTORICAL` material | Mine rationale and failure evidence |
| `CHANGELOG.md` | Release stream and packaged runtime input | One file holds every release; `internal/releaseannounce` parses version headings |
| `tools/docsgen` | Current, partial generator in nested `tools` Go module | Treat its flags and tests—not planned PRD commands—as executable truth |
| `docs/data/generated/contracts.json` | Current working-tree `GENERATED` output | Regenerate; never edit by hand |
| `docs/` | Repository documentation only | Nothing builds, renders, or publishes it; Markdown is the artifact |
The repository root has no `README.md` or `CONTRIBUTING.md` as of 2026-09-18.
## Choose one destination
1. State the reader's question.
2. Identify the owner of the behavior or decision.
3. Find the existing record of authority.
4. Extend that record or link to it. Do not make a second canonical table.
5. If no owner exists, route the ownership decision through the architecture campaign.
6. If the fact is generated, change the owned source definition and generator.
7. If the fact is external, date it and name the exact observation command.
| Content | Destination |
|---|---|
| Cross-cutting approved architecture index | `docs/prds/01-project-management.md` |
| New capability with no settled design yet (CLAUDE.md's "write a decisive doc before coding") | New `docs/prds/<capability>.md` — use the PRD template in `references/templates.md`, which folds in a multi-agent execution breakdown so the sub-issues can be picked up without re-deriving the design |
default_prompt:"Use $archie-docs-and-writing to write or update an authoritative Archie design, migration, incident, ownership, or operations document."
| <name> | `#<issue>` | <the call-site inventory rows this bead owns> | `lens-<key>`, `lens-<key>` | <one clause: what that lens actually catches for this slice — e.g. lens-contract for a new provider error-mapping table, lens-operator for a backend-down failure path, lens-deletionist when the section's whole point is "don't rebuild what exists", lens-boundary for a new domain/infra split, lens-maintainer for a new user-facing state machine> |
Pick lenses from the five in `.claude/workflows/council.js`
(`boundary`, `contract`, `deletionist`, `operator`, `maintainer`) by what the
slice actually risks getting wrong, not all five by default — a
description:"Use when naming, designing, reviewing, documenting, tracing, or migrating Archie concepts such as Agent, Identity, user, Message, Conversation, work intake, WorkflowExecution, plugin engines, channels, events, policy, forge, worktrees, or gates; when current task/gateway/store vocabulary conflicts with the approved architecture; or when a feature risks crossing domain ownership boundaries. Provides project-specific current-to-target mappings, ownership rules, lifecycle language, and glossary checks. Do not use for database API mechanics, general code tracing, config enumeration, debugging, or operations."
---
# Archie Domain Reference
Use one meaning for each noun. Keep external-system words at adapters, keep
domain meaning with its owner, and mark migration state explicitly.
## Classify every statement
As of 2026-09-18, Archie is partway through the domain migration: some approved
target packages now exist and are production-wired (`internal/domain/messaging`,
| **Gateway** | Current technical interface/router and package — not approved domain vocabulary. | **CURRENT ONLY:**`internal/gateway`, `internal/channels`. |
| **ChannelBindingID** | Stable reference connecting Agent to channel binding. | **APPROVED TARGET INPUT:** part of Conversation identity. |
| **Message** | Immutable application record with MessageID and typed content. Platform IDs are external correlations. | **CURRENT:**`internal/domain/messaging.Message`/`MessageID`; `gateway.MessageEvent` is a richer event type beside it. |
| **Conversation** | AgentID + UserIdentityID + ChannelBindingID + ExternalConversationID + ThreadID. | **CONFIRMED TARGET, partly current:**`internal/domain/messaging.Conversation`/`ConversationID` exist; the gateway session store still lacks canonical Agent/user IDs. |
| **Conversation branch** | Child conversation from one immutable parent message. | **CONFIRMED TARGET.** No current implementation. |
| **Work Intake** | Admission, validation, routing boundary between interaction and durable workflow-backed work. | **CONFIRMED TARGET, current package:**`internal/domain/workintake` exists. |
| **Accepted work request** | Channel-neutral handoff after Work Intake accepts proposed outcome. | **TARGET HANDOFF:** Agent System consumes it, selects Workflow version, creates WorkflowExecution. |
Do not equate an inbound Message with work. An Agent may answer, use
capabilities, retain information, or propose work without creating a
WorkflowExecution.
Target flow:
```text
external payload -> channel adapter -> canonical Message and Conversation
-> selected Agent turn -> optional proposed work -> Work Intake admission
-> accepted work request -> Agent System selects Workflow version -> WorkflowExecution
```
Do not describe current `/spawn` as this target. It directly creates a
| **Application composition** | Chooses implementations, translates config, connects contracts, orders startup/shutdown. Current and target: `internal/app`; `cmd/*` stays process-input-only. |
As of 2026-09-18, `internal/domain`, `internal/eventbus`,
`internal/infrastructure`, and `internal/app` exist; only `internal/policy`
does not. `internal/domain/agent` and `internal/domain/identity` are still
target-only.
```bash
for p in internal/domain internal/eventbus internal/policy internal/infrastructure internal/app;dotest -d "$p"&&echo"$p CURRENT"||echo"$p TARGET-ONLY";done
```
## Distinguish forge, repository, workspace, gate, and agent boundaries
description:"Reconstruct archie-core failures, dead ends, reversals, rejected fixes, and branch-only repairs from read-only git history and live call sites. Use when a symptom resembles a past production outage, deadlock, retry loop, protocol mismatch, configuration regression, worktree/cache fault, unsafe cleanup, linter semantic change, artifact leak, or recurring baseline repair; also use before reviving an old approach, declaring a fix reverted, or deciding whether a repair is current, settled, conditional, superseded, open, or merely a candidate."
---
# Archie failure archaeology
Stop the project from paying twice for the same lesson. Reconstruct what
happened from checked-out code, tests, configuration, and commit graph.
Treat commit prose as a lead, not proof. Preserve uncertainty.
All volatile observations are dated **2026-09-18** (HEAD `2e1e1549`); the merge-shape
section under Step 4 is dated **2026-09-20** (HEAD `1b0133d7`).
Route to `archie-debugging-playbook` for active symptoms,
`archie-codebase-discovery` for deep caller tracing.
## Use the status taxonomy exactly
| Status | Meaning |
|---|---|
| `settled` (`fixed`) | The failure, cause, resolution, and live replacement are proven. |
| `current` | The checked-out authoritative path still contains the behavior or contradiction. |
| `open` | The defect is evidenced, but no accepted and integrated resolution. |
| `conditional` | A fix is proven only for the named configuration, execution mode, peer, or assembly. |
| `superseded` | A mechanism was intentionally replaced. |
| `candidate` | A branch, proposal, or partial implementation may help but is not accepted. |
Never use `settled` to mean "a fix commit exists."
## Run the archaeology workflow
### 1. Freeze the observation point
```sh
git rev-parse HEAD
git status --short
git log -1 --date=iso-strict --format='%H %ad %s'
git branch -a --no-color --no-merged HEAD
```
### 2. Name the exact symptom
Capture: first wrong observable result; last confirmed-good boundary; process
mode; active config and deployment assembly; whether deterministic,
`<base-ref>` defaults to `origin/main`; name `gitea/main` or `HEAD` when that is
the trunk you mean, and `git fetch` first so the fast path is not stale.
| Exit | Meaning |
|---|---|
| `0` | Ancestor of `<base-ref>`, or recorded in a merged pull request — landed |
| `1` | On GitHub, in no merged pull request — not landed |
| `2` | Bad ref, no `gh`, offline, never pushed — **undetermined, not a negative** |
Branch on the code explicitly; `if on-main.sh <ref>; then` folds `2` into "not
landed", which is the error this helper exists to prevent. It answers "did *this
ref* land", not "did this work land" — a change reimplemented on another branch
still reads `not-landed` for the original commit.
Read parent version when failure is semantic:
```sh
git show <commit>^:<path>
git show <commit>:<path>
```
Require all six fields in an incident packet:
| Field | Required content |
|---|---|
| Symptom | Operator, user, test, or protocol observation |
| Attempted solution | What was tried before or during the failure |
| Root cause | The violated contract or mistaken assumption |
| Evidence | Commit, live path, test, trace, or production observation |
| Current status | One taxonomy value, dated when volatile |
| Settled rule | A constraint future work must preserve |
### 5. Reproduce narrowly, then route
```sh
env GOCACHE=/tmp/archie-archaeology-gocache GOTMPDIR=/tmp go test ./internal/<package> -run '^TestName$' -count=1 -v
```
If current behavior differs from chronicle, update the packet.
## Match symptoms to known incidents
| Symptom | Start with |
|---|---|
| `nats: no responders available for request` only from agent containers | Container network incident |
| Daemon crash-loops after config/schema work | SecretRef compatibility and Compose passthrough incidents |
| Stream shows empty cursor or first token, then hangs | FullStream/TextStream incident |
| MCP unit tests pass but real SDK server hangs | MCP framing and mirrored-peer incident |
| Telegram shows old commands after menu update | Telegram server-side scope incident |
| Tool discovery deadlocks, aliases mutate, or bad plugin hides rest | Tool-registry adversarial findings |
| Hidden `<memory>` content appears at end of truncated stream | Scrubber `Flush` leak |
| Broad lint cleanup compiles poorly while tests pass | Autofix, `nilerr`, and `308c199` incidents |
| Reused worktree is stale, half-prepared, or coupled to expired objects | Worktree/askpass/cache history |
| Repeated `fix: baseline gate repair` commits or parked tasks cycle | Baseline, no-op, and retry-loop incidents |
| CI cannot resolve `/work/apps/...` | Local module replacement incident |
| Build caches or dependency trees appear in diff | `.gotmp` and `node_modules` incidents |
| `diff_cap_lines = 0` still behaves as 400 | Diff-cap zero contradiction |
## Chronicle: work intake and retry loops
| Incident and date | Symptom | Root cause | Evidence and status | Settled rule |
|---|---|---|---|---|
| Label auto-claim, 2026-07-22 | >80 labelled issues enrolled under label polling. | Label polling means eligibility, not hint. | `519882f` changed the Compose profile to `assignee`; that file was deleted (`cbb7929e`) and survives as `deployments/docker-nats-stack.toml`, which sets `trigger = "assignee"`. `internal/config/config.go` defaults to `assignee` but permits `label` and `either`. **Status:**`settled`. | Default to assignee-driven pickup. Label/either are deliberate bulk enrollment. |
| Baseline-red park storm, 2026-07-23 onward | Task parks on gate failure that existed before its feature work. | Parking/retrying cannot change pre-existing failure; auto-repair mixes repository repair into feature scope. | `b2482af` made `StageBaselineGate` launch builder instead of parking. Nine repair commits in history. **Status:**`current` mitigation and architecture weak point. | Measure untouched baseline first. Track baseline repair as explicit change. |
| Passed build with zero changes, 2026-07-23 | Commit-push reports "no changes," parks, retries, repeats. | "Passed with no changes" lacked terminal domain outcome. | `62c0df1` introduced no-op detection; `2bf42bd` set `Outcome`. `TestStageCommitPushClosesIssueWhenBuildNoChanges`. **Status:**`settled`. | Model no-op as explicit terminal result. |
| Infinite parked-task retry, 2026-07-23 | Removing parked label repeatedly requeues with no terminal bound. | Retry count not durable or capped. | `a8fdb50` added persisted `retry_count`, global/per-repo `max_retries`, and `dead`. **Status:**`settled`. | Every autonomous retry needs durable attempt state, explicit bound, terminal state, and operator-visible reason. |
## Chronicle: runtime and peer contracts
| Incident and date | Symptom | Root cause | Evidence and status | Settled rule |
|---|---|---|---|---|
| Container network auto-detection, 2026-07-27 | Every container task returns `nats: no responders`. | `selfNetwork` inspected hostnamed container, silently fell back to default bridge. | `37cf089` records incident, adds `containers.network`; `2ac306b` pins `archie-core_default`. **Status:**`conditional`. | Make cross-container network membership explicit in deployment. |
| SecretRef schema crash-loop, 2026-07-27 | Both identities demand `ARCHIE_GITHUB_TOKEN` despite Gitea config. | Removing old `token_env` field let TOML ignore deployed value. `1f8588d` restored precedence-compatible fallback; a later `308c199` removed the `Forge.TokenEnv` declaration while `finalize` still referenced it. | **Status: `settled`** as of 2026-09-18 — `config.Forge.TokenEnv` is declared (`internal/config/config.go`) and `configuration/defaults.go` converts it to an env `SecretRef` when the structured token is empty. | Preserve decoded compatibility until deployed files migrated and rejection of stale keys observable. |
| Compose secret omission, 2026-07-27 | Config names valid env var, container sees it empty. | Compose forwards only listed environment entries. | `22fc0ef`, `d0624b7`. **Status:**`conditional`. | Trace every secret from config key to host value to Compose passthrough to process lookup. |
| FullStream/TextStream deadlock, 2026-07-27 | Streamed Telegram reply renders empty cursor, typing never clears. | ai-sdk makes `FullStream` authoritative and backpressured; `TextStream` is best-effort. | `6a0bd27`. **Status:**`settled` with regression-test gap. | Drain authoritative stream through close. |
| MCP Content-Length framing and mirrored fake, 2026-07-26 to 2026-07-27 | Internal MCP tests pass while official-SDK servers do not. | MCP stdio uses newline-delimited JSON. Test subprocess called same helpers, mirroring the same wrong protocol. | Compare `f2768eb:internal/tools/mcp/framing.go` with `dda4cde`. **Status:**`settled`. | For wire contracts, test raw canonical frames and independently implemented peer. |
| Telegram command scopes persist by bot token, 2026-07-27 | Startup reports eight commands published, DMs show ~60 old Hermes commands. | Telegram chooses most specific scope; older scopes survive redeploys. | `cec0f3e` adds menu and deny-by-default; `576c7f5` publishes all three scopes. **Status:**`settled`. | Inventory and overwrite every relevant server-side scope. |
| NATS fetch error looked like empty queue, 2026-07-27 | Consumer receives zero messages, treats JetStream failure as "no work." | Batch error state not checked after channel closed. | `0d09a2e` repro; `78a9145` merged through `21ceef0`. **Status:**`settled`. | Check terminal iterator/batch error state even when data channel is empty. |
## Chronicle: implementation and tooling traps
| Incident and date | Symptom | Root cause | Status |
|---|---|---|---|
| Tool registry passed first implementation but held eight defects, 2026-07-26 | Availability can deadlock; schemas mutate after registration; discovery stops at first bad source; literal extraction wrong. | Callbacks ran under `RLock`, copies shallow/shared, parsing partial, matching broad, discovery fail-fast. | `9f6c36c` lists all eight fixes. **Settled.** Never call extension code under registry lock. Clone nested data. Parse complete grammar. Isolate discovery failures. |
| Memory scrubber `Flush` leak, 2026-07-26 | Stream ending inside `...secret</mem` emits buffered hidden memory to visible response. | Pending bytes did not retain whether captured inside `<memory>` block. | `b4aaaf0`. **Settled.** Test every streaming state at EOF. Flush is security boundary. |
| All eleven `nilerr` findings semantic false positives, 2026-07-28 | Mechanical "fixes" would return Go errors while tests pass, breaking model correction, chat, NATS envelopes, clean shutdown, indexing. | Linter cannot see failures carried as text, envelopes, shutdown signals, or skipped entries. | `86cfc19`. **Settled.** Review semantic channels one site at a time. |
### Preserve the eight tool-registry review lessons
| Defect fixed in `9f6c36c` | Required review question |
|---|---|
| `Available` evaluated `CheckFn` under `RLock` | Can a callback re-enter or block while lock is held? |
| `Register` stored caller references | Can caller mutate registered state afterward? |
| `Clone` copied nested schema maps/slices shallowly | Is every mutable layer detached? |
| `stringLit` mishandled escapes/backticks | Does parsing follow Go literal semantics? |
| `intLit` omitted negative/hex/octal/binary forms | Are all supported numeric forms handled or rejected? |
| `Discover` aborted on first error | Can one bad extension hide healthy extensions? |
| `isRegisterCall` matched too broadly | Is the exact receiver/call shape proven? |
| `schemaLit` accepted only string values | Are booleans, integers, arrays, nested maps preserved? |
## Chronicle: worktree and repository state reversals
| Step and date | Symptom | Root cause | Settled rule |
|---|---|---|---|
| Existing worktree skipped, 2026-07-23 | `Prepare` returned when `.git` existed. | Existence did not prove freshness or completed preparation. Later replaced `.git` readiness with sentinel. | Define completed-state marker and revalidate remote/base/branch state on reuse. |
| Sentinel outside `.git`, 2026-07-24 | `.archie-prepared` marked setup; go-git `Add(All)` doesn't honor exclude. | Orchestration metadata needs to be outside tracked worktree by construction. | Put sentinel at `.git/archie-prepared`. |
| Askpass rewritten each call, 2026-07-24 | Token-emitting shell script rewritten for every git command. | Comment wasn't invariant; no test checked mtime. Later removed shell git and askpass entirely. | Prefer in-process credentials. |
| Bare object cache, 2026-07-24 | `--reference-if-able --dissociate` plus TTL to accelerate clones. | go-git has no `--dissociate` equivalent; expiring cache would corrupt active worktrees. | Never accept clone acceleration making task correctness depend on expiring cache. |
| Shell git replaced by go-git, 2026-07-28 | Port exposed host GPG inheritance, sentinel tracking, merge-base diff semantics. | RPC handlers used `context.Background`, making in-process clones unbounded. | Audit every adapter and cancellation boundary after replacing killable subprocess with in-process I/O. |
## Chronicle: cleanup, artifacts, and contradictory policy
| Incident and date | Symptom | Root cause | Status | Settled rule |
|---|---|---|---|---|
| Tracked `.gotmp`, 2026-07-27 | Build-cache binaries, generated `_testmain.go`, `.git-askpass` appear in commits. | Workaround path not ignored before use. | `4cb0577` removes artifacts and adds `.gotmp/` to `.gitignore`. **Settled.** | Put caches outside repo or ignore before first command. |
| Tracked `docs/node_modules`, 2026-07-28 | Hundreds of pnpm symlink entries become repository content. | `docs/node_modules` neither ignored nor excluded from commit. | 237 entries at that time; the VitePress site was removed (`84b32694`) and `git ls-files | grep -c node_modules` is now **0**. **Settled.** | Track lockfiles, never installed trees. |
| `308c199` cleanup regression, 2026-07-28 | `TestRunWrapsExternalCommand` returns `"\n"` instead of `"wrapped\n"`; forge compatibility removed again; dependency artifacts added. | Semantic edits classified and reviewed as cleanup. | The focused skillscript test **passes** as of 2026-09-16. **Settled.** | No commit is "cleanup" for gating purposes. |
| `diff_cap_lines = 0` contradiction, introduced at project start | Operators set zero expecting unlimited, but decoded config becomes 400. | `finalize` converts zero to default 400; same sentinel means both "unset" and "unlimited." | **Current/open** contradiction. | Never overload zero value with both defaulting and explicit policy. |
## Keep unmerged work as dated candidates
As of **2026-09-18**, the six `fix/4x` and `feat/5x`/`feat/75` candidate
branches recorded here on 2026-07-28 no longer exist on either remote —
`git branch -r --no-merged HEAD` reports only `gitea/main` (and the Dolt helper
ref). Treat their concerns as `superseded` unless a live branch re-raises one.
| Former candidate branch | Claimed concern |
|---|---|
| `origin/fix/43-loaddir-no-timeout-around-yaegi-eval-can-hang-daemon-startup` | Bound Yaegi evaluation during `LoadDir` |
| `origin/fix/45-skillscriptrun-ignores-context-cannot-be-canceledtimed-out` | Make skill scripts cancellable |
| `origin/fix/48-transition-ignores-from-status-guard-allowing-lost-updates` | Enforce expected source state atomically |
description:"Run and observe Archie safely with a host daemon and the repository's Docker Compose NATS service. Use when starting or stopping archied, running an archie-agent NATS worker, checking readiness, following logs, locating task state/worktrees/memory/container volumes, understanding inprocess/subprocess/NATS execution, inspecting the image pipeline, or planning an operational rollback without changing architecture."
---
# Run and operate Archie
Use this runbook to operate the implementation that exists on **2026-09-18**
(HEAD `2e1e1549`). Treat source and tests as current; treat `docs/archive/` as
| `archie-agent` | Long-running NATS worker. Consumes per-stage `archie.agent.>` requests and full-task `archie.taskrun.>` requests. Not a stdin/stdout worker. |
| Stage request | One autonomous workflow stage sent on `archie.agent.<task-id>.request`. |
| Full-task handoff | A whole workflow sent on core NATS subject `archie.taskrun.<task-id>` to a task container. |
| Work directory | `work_dir`: task clones plus memory and candidate index artifacts. |
| State path prefix | `db_path`: the configured prefix. Task/event state uses `<db_path>-tasks.sqlite`; conversation state uses `<db_path>-conversations.sqlite`. |
## Apply the operational safety boundary
Assume every daemon start can change local and external state.
- Obtain explicit authority for config, forge identity, repositories, NATS
account, Docker host, and deployment host before starting.
- Never use production tokens for a smoke test.
- Do not call `archied -once` as a dry run. It accepts invitations, verifies
push access, polls the forge, enqueues/labels work, reconciles PRs, processes
tasks, and then exits.
- Do not expose the dashboard publicly. It has no authentication, and
`POST /api/tasks/clear` deletes terminal task records.
- Do not print secret values. Record environment-variable **names**, config
checksums, image digests, and paths instead.
- Stop with `Ctrl-C`, `SIGTERM`, or Compose. Do not use `SIGKILL` unless graceful
shutdown has demonstrably failed.
There is no config-only or dry-run flag.
## Know the command surfaces
### `archied`
| Flag | Exact behavior |
|---|---|
| `-config <path>` | Load base TOML. Default: `$XDG_CONFIG_HOME/archie/config.toml`, or `~/.config/archie/config.toml`. |
| `-config-overlay <path>` | Decode a second TOML file into the base config before defaults and validation. |
| `-once` | Run startup plus one poll/process cycle, then exit. This changes state. |
| `-requeue <task-id>` | Requeue a parked/waiting task, then exit unless `-once` is also set. This changes state. |
### `archie-agent`
| Flag or environment | Exact behavior |
|---|---|
| `-nats-url <url>` | Select NATS; falls back to `NATS_URL`. One of them is required. |
| `-consumer <name>` | Set the durable JetStream consumer name; default `archie-agent`. |
| `NATS_TOKEN` | Optional NATS token read directly by the worker. |
Both linked binaries may also display Go's `-quickchecks` flag from
`testing/quick`; it is not an Archie operations control.
## Select the execution mode deliberately
| Config shape | What runs | Operational status on 2026-09-18 |
|---|---|---|
| `agent.mode = "inprocess"` and no `[nats]` | `archied` polls and claims from SQLite, runs workflow stages and model tools in-process. | **Production-wired candidate.** No process or OS isolation. |
| `agent.mode = "subprocess"` | `archied` starts `agent.command` per stage and expects one JSON invocation on stdin, one response on stdout. | **Open/broken with default command.**`cmd/archie-agent` is a long-running NATS worker and never calls `agentexec.ServeOne`. |
| `agent.mode = "nats"`, `[nats]`, containers disabled | `archied` runs the workflow; each autonomous stage goes to a separately started `archie-agent`. | **Implemented but operator-assembled.** Launch and supervise a worker separately. |
| `agent.mode = "nats"`, `[nats]`, `containers.enabled = true` | `archied` publishes task discovery through JetStream, prepares a worktree, spawns one agent container, sends the whole workflow on `archie.taskrun.<id>`. | **Host daemon + Compose NATS path.**`deployments/docker-nats-stack.toml` demonstrates it. |
## Run a local foreground daemon
```bash
task build
task --list
./bin/archied -h
./bin/archie-agent -h
```
Choose an explicitly approved config:
```bash
ARCHIE_CONFIG=/absolute/path/to/config.toml
test -r "$ARCHIE_CONFIG"
./bin/archied -config "$ARCHIE_CONFIG"
```
Expect JSON logs on stderr. Require: `nats connected` when `[nats]` configured;
| Container worktree | Host worktree bind-mounted read/write at `/data/worktree`; `task.json` written under `.git/` so the agent's commit cannot sweep it onto the task branch. |
| Built-in memory | `<work_dir>/memory/MEMORY.md` and `<work_dir>/memory/USER.md`. |
| Telegram update state | `<work_dir>/telegram-update-deferrals.json` plus hashed `release-announcements-*.json`. |
| Codesearch candidates | Defaults derive as `<work_dir>/indexes` and `<work_dir>/workspace-indexes.db`; no `indexing.Manager` construction found in daemon composition root. |
| Optional repository volume | `archie-repo-<owner>-<repo>` mounted at `/data/repo`. |
| Ecosystem cache volumes | `archie-cache-go`, `archie-cache-node`, etc., mounted below `/data/cache`. No code sets tool cache env vars to those mount paths. |
| NATS data | Compose declares `nats_data:/data`; NATS command does not set a store directory. |
Compose runs NATS only; `archied` and all configured state paths remain on the
host. The host daemon talks to the local Docker socket directly and bind-mounts
each task worktree into the agent container it creates.
## Understand NATS and container observation
The `ARCHIE_TASKS` JetStream stream uses file storage and work-queue retention
for `archie.task.>` and `archie.agent.>`.
| Plane | Subjects and behavior |
|---|---|
| Discovery | `archie.task.bug`, `.feature`, `.bootstrap`, or `.default`; daemon durable consumer `archie-daemon`, 5-min ack wait, max 3 deliveries. |
| Per-stage requests | `archie.agent.<id>.request`; worker durable consumer defaults to `archie-agent`, 30-min ack wait, max 3 deliveries; response address in `X-Archie-Reply`. |
| Container task | Core NATS request/reply on `archie.taskrun.<id>`. Task container reads `/data/worktree/.git/task.json` and creates dedicated subscription; shared worker uses queue group `archie-taskrun-workers`. |
| Privileged RPC | Store operations go to the gRPC State Store (`internal/infrastructure/staterpc`, task-scoped grants); forge and worktree operations return to `archied` over core NATS subjects in `internal/forgerpc` and `internal/worktreerpc`. |
Set `containers.network` explicitly. `deployments/docker-nats-stack.toml` uses
`archie-core_default`. Auto-detection inspects the daemon container; on failure,
workers join Docker's default bridge and cannot resolve `nats`. Initial
`ErrNoResponders` is retried for 20s at 250ms intervals.
If `nats.token_env` is configured, `archied` refuses startup when that variable
is empty. It injects the resolved value as `NATS_TOKEN` into task containers.
It forwards only configured provider-key variables.
## Fence current operational limitations
Open limitations until code/tests prove otherwise:
-`subprocess` + default `archie-agent` is protocol-incompatible.
- A deployed overlay previously using legacy `token_env` still converts: the
structured `forge.token` secret reference wins when both are present and
Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.
## What is Beads?
Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
# The dashboard suite runs in CI too, or it only ever runs when
# someone remembers to; the Go steps above never touch it.
- name:Dashboard tests
run:|
npm ci --prefix ui || npm install --prefix ui
npm test --prefix ui
- name:Release tags must match changelogs
run:|
set -e
@@ -119,45 +117,27 @@ jobs:
fail=1
}
;;
archied/v* | archie/v*)
# Legacy per-component tags. History is not re-tagged, and the
# merged CHANGELOG.md carries every component's versions, so the
# section is found there rather than in a component file.
ver="${tag#*/v}"
echo " legacy tag $tag -> looking for [$ver] in CHANGELOG.md"
grep -q "^## \\[$ver\\]" CHANGELOG.md || {
echo " FAIL: CHANGELOG.md has no [$ver] section"
fail=1
}
;;
esac
done
if [ $fail -ne 0 ]; then
echo
echo "A release tag points at this commit but its changelog does not"
echo "describe that version. Run: task release:prepare VERSION=<ver>"
echo "edit the generated notes, then: task release VERSION=<ver>"
echo "describe that version. Cut releases with the release workflow."
exit 1
fi
if ! git tag --points-at HEAD | grep -qE '^(v[0-9]|archied/v|archie/v)' ; then
echo "::warning ::No release tags at HEAD, so this build publishes :latest for a commit that is not a release. It is stamped dev+<sha> and tagged sha-<sha> so it stays traceable and restorable, but it supersedes the previous release's :latest stamping until the next release is cut."
if ! git tag --points-at HEAD | grep -qE '^v[0-9]' ; then
echo "This commit isn't a release, so the images are published as :edge and sha-<sha>; :latest keeps naming the newest promoted release."
fi
build-and-push:
archied-image:
needs:gate
runs-on:ubuntu-latest
runs-on:self-hosted
steps:
- name:Checkout
uses:actions/checkout@v4
with:
fetch-depth:0
# Deliberately NOT `github.sha`. On a tag push that is the ref's OBJECT id,
# and every release tag in this repo is annotated — measured, 80 of 80
# `archied/v*` and `archie/v*` tags are tag objects — so it names something
# that cannot be checked out. `archied/v1.36.0` is an instance: it points at
# 6720bc42 (a tag object) and dereferences to commit c25f8d39. The producer
# is right to create annotated tags; the consumer stops guessing.
description:"major, minor, patch, or an exact version such as 1.57.0"
required:true
default:minor
concurrency:
group:release
permissions:
contents:write
jobs:
cut:
runs-on:self-hosted
steps:
- name:Check DEPLOY_TOKEN is configured
env:
DEPLOY_TOKEN:${{ secrets.DEPLOY_TOKEN }}
run:|
if [ -z "$DEPLOY_TOKEN" ]; then
echo "::error::DEPLOY_TOKEN is not set for this repository, so the release cannot push its commit and tag. Set the secret here, or dispatch the release from the Gitea primary."
@@ -5,6 +5,973 @@ release's per-component sections are labelled beneath its heading.
## [Unreleased]
## [1.62.0] - 2026-11-10
### archied
- When an agent step reaches its step budget, the task asks to continue instead of parking. Approving resumes the stopped step with its conversation, including inside a parallel branch.
- A parked task is flagged when the credential, connection or setting its blocker names changes, so you can see which parks are worth retrying.
- Merging, closing and issue tools use the repository's own forge connection. A repository on Gitea no longer gets a GitHub 404 when its pull request is merged from archie.
- A restart re-queues a running task at the step it was interrupted in, and parks it after three restarts instead of looping.
- Issues and pull request review activity from authors without write access are ignored.
- A baseline repair made by the repository gate is opened as its own pull request before the task continues.
- Closing an issue that still has open dependencies is recorded as refused, rather than parking the task.
- When the work volume fills, stale task clones are reclaimed; clones with uncommitted or unpushed work are kept. Clones need 1 GiB free, not 5.
- A corrupt repository mirror is rebuilt, and a push that hits a missing object rebuilds the mirror and retries once.
- Readiness reports degraded when the run loop stalls.
- Execution budgets set in the dashboard are no longer reverted when the model catalogue loads.
- A full volume is reported as an environment failure, and an unreachable secret engine as unavailable, rather than as a bad or missing credential.
- A park from the workflow identity check now appears in the task log.
- Every task records the identity that created it, and its queued event names the task, actor and principal. System is the one instance identity: it polls forge connections and owns the root grants and connection permits the bot-named identity used to hold, which existing tasks, grants and permits move to on upgrade.
### archie-ui
- A chat reply is no longer lost when you switch conversation or reload mid-answer: the turn finishes and its reply is in the conversation when you come back. Stop is the only way to cancel it.
- The task page offers every action the task list does.
- Workflows have row actions, enabling or disabling one confirms with a toast, and the editor toolbar wraps on narrow screens.
- The dashboard lists five tasks needing attention, not every one.
- Dismiss all no longer covers the unread badge.
### archie-agent
- The agent image includes Task, so the repository gate no longer downloads it on every run.
## [1.61.3] - 2026-11-08
### archie-ui
- Issue, pull request and repository links on tasks open on the forge the repository's connection points at, instead of GitHub.
- Settings: the Harness page is now part of Agent profiles. The setup terminal and the credential sign-in status sit on the same page as the Kit profiles they target, so a profile with a Kit can be signed in from the page that defines it.
## [1.61.2] - 2026-11-07
### archied
- archied no longer gets killed by the systemd watchdog when a restart or update leaves many tasks to resume. Each resumed task used to cost a full queue poll before the next was picked up, so a dozen of them outlasted the 30-second watchdog; an update that hit this was rolled back.
## [1.61.1] - 2026-11-07
### archie-gateway
- An image or voice attachment that arrives as a link is now checked against what the link serves, the same as an uploaded one. A link whose content is not the declared type, or that cannot be read, is refused.
### archie-ui
- A workflow created on the canvas now saves the agent it runs as, so it runs instead of parking with "declares no identity to run as".
### archie-state-store
- A workflow that no longer validates after an upgrade (for example it names a step type that was removed) is repaired at startup instead of breaking every workflow. A shipped workflow is restored from this release's copy; a workflow you created is removed and logged, and its earlier revision stays in the resource history. Valid workflows you created or edited are kept.
## [1.61.0] - 2026-11-07
### archied
- A `workflow.handoff` now finishes its run and starts a separate, linked run of the next workflow on the same issue, instead of continuing as another attempt. The task page links each run to the one before and after it; attempts count only retries of one run.
- A task no longer fails to prepare its worktree with "some refs were not updated" after a tag or branch moves on the forge.
### archie-ui
- The task page no longer flashes its loading state on every live update while a task runs.
### archie-state-store
- The extension catalogue lists and installs again. Its default signing key has changed; an instance that set its own catalogue signing key in Extension settings keeps using that key.
## [1.60.0] - 2026-11-02
### archied
- Curators can list a repository's open issues and file new ones with the `issue_list` and `issue_create` tools, which reach the forge through the daemon. A curator files only when its definition declares `issue_create`; the shipped self-intake example runs in dry run with `issue_list` for deduplication. Listing every open issue needs the forge extensions from the archipelago release after 1.2.0.
## [1.59.0] - 2026-11-02
### archied
- Forge extensions can open issues: the forge surface gains `CreateIssue` alongside list, comment and close, and the bundled Gitea and GitHub extensions implement it.
## [1.58.1] - 2026-11-01
### archied
- The systemd watchdog now also watches the task intake loop, and its warning names the loop that stalled.
- archied no longer restarts about a minute after it starts. Under systemd, the watchdog never saw a poll pass and killed it on every start since 1.56.0.
## [1.58.0] - 2026-11-01
### archied
- Running `install.sh` over an install whose services are already running now restarts them, so they run the new binaries.
## [1.57.0] - 2026-10-31
### archied
- A release reaches `stable` only after it has run on a canary for a day and passed: `archied release publish` now publishes to `next` alone, `archied release canary start|check` installs a release on a canary and judges it from the canary's dashboard, promoting it or rolling the canary back, and `archied release promote` moves `stable` by hand. Promotion refuses a prerelease and a release older than the one `stable` names. The `archied` and `archie-agent` images are published as `:v<version>`, and `:latest` moves only when a release is promoted.
## [1.56.0] - 2026-10-31
### archied
- **Install once by hand.** Releases are now signed and published to `git.catlow.cloud/sam/archie`. A host on 1.55.0 or earlier still looks for releases on GitHub, so it finds this one only by running the new installer once: `curl -fsSL https://offloaded.dev/install.sh | bash`. Updates after that come from Settings → Status as before.
- Releases are signed. Updates and `install.sh` refuse a release the release key did not sign, a zip that is not the one signed, and a channel moved back to an older release. Where releases and the extension catalogue come from is a setting (update settings and extension settings, or `[distribution]` in `config.toml` for a new instance), and `archied release keygen` and `archied release publish` publish signed releases to your own registry.
- Organisations: forge connections, schedules, alerts, chat channels and audit are per organisation. A member acts in the organisation they select, the setup checklist follows it, and the instance's own forge is its root connection.
- Workflows are edited as a draft and reach the running workflow only when published. Build a workflow with Archie from the canvas: chat writes the draft into the editor for review, and the editor locks while it does.
- Schedules run from the State Store with run history, fire into their own organisation, and can trigger workflows. Daemon maintenance runs as built-in schedules.
- A parked task links to the page that fixes its blocker (repository, credential, model or forge extension), and a parked task can be retried on the current workflow definition.
- Shipped workflows run as a seeded agent identity with narrow grants instead of the root identity. Credential services are granted to dashboard identities from pickers, and personal API tokens have a name, a lifetime and a last-used time.
- An org-scoped audit page with filters, a live tail, export and a retention setting; recorded access denials are kept for a set time and listed on their own page.
- Instructions replace SOUL: instance, organisation, workflow and repository instructions are layered into every agent stage.
- Chat docks at the bottom of every page and stays open across navigation. Tool calls show where they happened in a reply, with arguments (secrets masked) and durations, and `ask_questions` asks several questions at once.
- Run more than one instance side by side: `ARCHIE_INSTANCE` names an instance, and the installer installs and updates a named one.
- Pull request reviews submit REQUEST_CHANGES on blocking findings, list findings outside the diff in the review body, and repost without inline comments when the forge refuses their placement.
- A workflow installs a repository's declared tooling before its gate, and tasks clone from a shared per-repository mirror.
- Traces: services, model and tool calls and task containers export OpenTelemetry spans, and log lines carry the trace id.
- Telegram runs as an archipelago channel extension, enabled from the Extensions page.
- The Extensions page groups the marketplace by surface, is searchable, shows install state, and offers an update only when the catalogue has one.
- The dashboard is rebuilt on shared components: a new Archie mark, a theme that follows the OS, task logs as a table, and layouts that fit a phone.
### archie-agent
- Released with archied 1.56.0; task containers export trace spans and install a repository's declared tooling before its gate.
## [1.55.0] - 2026-10-16
### archied
- Personas are gone: the Personas settings page, the chat Personality selector and `/personality`. A selected persona never changed what the model was told; SOUL (Settings → SOUL) is the one place to set Archie's identity and style. Stored persona settings are deleted on upgrade.
- The shipped SOUL describes Archie as the assistant for an event-driven automation system rather than a coding assistant. A SOUL you have saved is kept as it is.
## [1.54.3] - 2026-10-16
### archied
- Chat can help write a workflow: it reads your workflows and the step catalog, writes a definition, and checks it the same way saving does, fixing what the check reports. It does not save; paste the YAML it gives you into the editor's YAML view and save there.
## [1.54.2] - 2026-10-16
### archied
- Tool calls from Gemini models (Interactions API) receive their arguments intact. Any tool that takes arguments, such as `dashboard_navigate` in chat, failed with "invalid character '{' after top-level value".
### archie-agent
- Agent steps on Gemini models (Interactions API) pass tools their arguments intact instead of failing to decode them.
## [1.54.1] - 2026-10-16
### archied
- Update checks, `archied update install` and `install.sh` find releases at `github.com/samcharles93/archie-releases`, so a host can update again. A host on 1.54.0 or earlier still looks in the old place and has to be upgraded to 1.54.1 by hand once.
## [1.54.0] - 2026-10-16
**Upgrade note:** services now authenticate each other with TLS certificates from your own CA instead of shared tokens. Before upgrading a host whose services listen on anything but loopback (any host running agent containers), issue a certificate per service (`archied`, `archie-gateway`, `archie-messaging`, `archie-state-store`, `archie-ui`, each with its name as the DNS SAN and both server and client auth), add `[tls] ca_file` and `cert_dir` to `config.toml`, and remove every `target_token`, the `*_TOKEN` service variables and the `--token`/`--*-token` flags, including archie-ui's `-token` and `-token-file`. A unit that still passes a removed flag fails to start. See `config.example.toml`.
### archied
- Services authenticate each other with mutual TLS. Each process presents `<cert_dir>/<service>.pem`, peers must chain to `ca_file`, and a caller is identified by its certificate rather than by what it claims. Renewed certificates are picked up without a restart. Without `[tls]`, services listen on and dial loopback only. The harness setup terminal requires `[tls]`.
- Every gRPC service caps the streams a connection holds, times out stalled handshakes, releases a dead client's streams, and drains for at most 10 seconds on shutdown. Messaging exits when its listener fails instead of staying up without delivering.
- The dashboard has user accounts. First run opens browser setup for the organisation, workspace and first administrator; people then sign in with a password, a passkey or your identity provider, and account administration lives under Access. The shared dashboard token is gone; reach the dashboard remotely through an HTTPS reverse proxy.
-`archied update install` updates a host in one transaction: it verifies the release, stages every binary, pulls the agent image by digest and backs up the database, then restarts the services in order and rolls everything back if archied is not healthy for two minutes.
- Each workflow runs as the identity it declares, checked on every attempt along with the identity that started it. A workflow that declares none is refused, a called workflow runs as its caller's declared identity, and shipped workflows run as the instance root.
- Test-run a workflow draft before saving it, with forge and push writes suppressed and recorded per step. The History tab lists a workflow's revisions, diffs them as YAML and on the canvas, restores one into the editor, and shows which revision each run used.
- Start a task from the dashboard. The dashboard home shows activity and setup, and a running task has a read-only Sandbox tab that follows its container.
- The topbar's Jump to is a command palette, settings lists open as accordions that wait for a new item to be saved, and history restores land as a draft applied from the save bar.
- Labels, hints, alerts and empty states say what is wrong and what to do, without tutorial or marketing prose.
- Org isolation is tighter: harness secrets, identity writes, principals, playbook dispatch and model selections in chat stay in the caller's org, instance settings are written by the system org only, and creating a source or reloading a channel is authorized against the target.
- Binding dispatch claims its capture and enqueues the task atomically, so a capture cannot start two runs, and the run-time workflow check sees the binding event's signature and address.
- Service-unhealthy alerts count their grace from the last report and also cover a service that went silent, and a restart no longer clears an alert still inside its grace. An invalid stored access policy raises an alert until it validates.
- A failed cancel of a called workflow no longer leaves the caller running, retention spares captures still waiting to be dispatched, and EDA playbooks load and report at start instead of on first dispatch.
- Chat model selection works again for provider models.
### archie-agent
- Each run acts as its workflow's declared identity.
- A task snapshot carries only the model limits its aliases resolve to.
- A build step's "no changes" result comes from its writable stages and clears once a commit lands.
- Test runs suppress forge and push writes and record what they would have done.
- The default persona is a reporting-focused identity prompt, without the one-question limit in chat.
## [1.53.0] - 2026-10-11
### archied
- Every organisation's data is its own. Chats, tasks, events, transitions, steps, tool calls, run statistics, event sources, event types, mappings, bindings and agent memory are read and written in the org that owns them, and a request can no longer write into another org. Rows written before orgs existed move to their owner's org on upgrade.
- An instance admin decides what each org may reach: the models it can use, and whether it may register providers under its own credentials. Org Settings gains a Models tab and instance Models gains Org access. The system org is never restricted; another org uses nothing until it is granted.
- Models are addressed by alias. Aliases replace model roles, one resolver serves every purpose (agent steps, implement, PR review, MCP sampling, chat, embedding, transcription), and an unknown alias fails instead of falling back to a default. The step editor and the chat picker offer aliases, and a workflow naming one that does not exist is refused when saved.
- Chat sessions belong to one org; a chat resolves its models in the caller's org and is billed to it, and a task run from chat posts its outcome back to that chat.
- Add a member by provider subject, or by email as a placeholder that the first sign-in the provider vouches for claims.
- The workflow canvas authors parallel branches as lanes, adds a switch step that runs the case matching a reference, and edits a call's interface. A step shows its role, its number and its run trace.
- The workflows list shows each workflow's running count and latest run result, the canvas reveals its data-edge handles on hover, and restoring a version asks for confirmation.
- Store packages can auto-update: a package given the policy is moved to the catalogue's newest digest by a State Store ticker. An update asking for more authority than was accepted waits as a pending update with the running version untouched; approving it accepts the new authority, and a rollback restores the previous version with the authority accepted against it.
- Model provider keys never enter an agent container: the runtime reaches its providers through the egress proxy, which holds the keys. A task's own credential can no longer replace the workflow definition its run is pinned to, and a package workflow's triggers, tools and forge calls are bounded by the authority accepted for the package.
- The dashboard warns when it is reachable from off-host over plain HTTP, and the wildcard listen address counts as off-host rather than loopback. Instance health, logs, config and identities, the setup checklist and the skill catalogue are system-org only, and API requests are refused until the access chain has loaded.
-`/approve` reaches Telegram; the router served it but nothing published it.
- A worktree a killed container left root-owned is taken back by the daemon, and a PR review's benchmark runner works again on configured models and public PRs.
- An unserved `/api` path returns 404 instead of the dashboard page, and an input group's select no longer loses clicks to its addon.
### archie-agent
- The runtime reaches model providers through the egress proxy, so provider keys stay out of the container.
- Agent steps resolve model aliases and their own org's models and credentials, failing on an unknown alias instead of falling back.
- A switch step runs the case matching its reference.
- A call waiting on another step is reconciled from durable steps, so it resumes after a daemon restart rather than stranding.
## [1.52.0] - 2026-10-09
### archied
- The harness page's setup terminal opens a real session: it starts an ephemeral container from a Kit profile, runs the CLI's own login and captures the OAuth tokens at the provider's token endpoint. Point the dashboard at the daemon with `[services.harness].target` and a `HARNESS_TOKEN` and it stops answering 503; the terminal is created at your browser's size. Takeover of a live task is not in this release.
- A credential's token endpoint is refused when the run is not granted that service, instead of proxy-ing the provider's real tokens into the container.
- Settings → Profiles, Credential bindings and Playbooks are editable from the dashboard, and curator definitions can be changed and applied without a restart.
- Settings say whether each one applies live or needs a restart, show what is consuming resources, and report whether an apply landed.
- Status shows each service's dependency checks, the agent workers and the broker.
- The Logs page reads recent logs from every service, not just the daemon.
- Captures and webhook sources are scoped to the org that owns them: the list, retention and delivery authorization all act in the right org, and a workflow definition resolves in its own org.
- Chat settings are attributed to the signed-in user, and Settings → Tokens explains when a personal token cannot be created.
- A channel enabled after Archie started works immediately; a channel that fails on its own recovers; a failed channel is no longer reported as enabled, and stored channel settings no longer save duplicate or unnormalized values.
- The task table sorts, the command palette no longer scrolls sideways or loses its highlight, unknown routes render a not-found page, and configuration reload failures are shown instead of passing silently.
- A scheduled job whose payload names a dangerous command is refused.
- A disabled model provider is never served from the ambient API key.
-`generate_video` is backed by ai-sdk's MiniMax video provider.
- A dashboard token is no longer written to the startup log.
### archie-agent
-`workflow.call`: a call is keyed on its declared step path, its key is freed once the callee reaches a terminal state, and a caller waiting on a callee releases its capacity instead of holding it.
-`command.run` honours step retry and `on_failure`.
- A value passed between steps keeps its declared type, and optional result booleans are enforced only when the workflow declares them.
- Capture tools have their results checked against the declared schema.
- A single-cycle run waits for its in-flight tasks before exiting, and identity tasks inherit live settings.
- Kit containers run Docker's init as PID 1, so orphaned processes are reaped instead of accumulating inside a long task.
## [1.51.1] - 2026-10-08
### archied
- Chat with OpenAI's gpt-6 models (gpt-6-luna and the rest) works with tools; a turn failed with "Function tools with reasoning_effort are not supported".
## [1.51.0] - 2026-10-08
### archied
- A secret engine enabled after Archie started (Bitwarden, for example) now supplies its keys straight away; providers that depended on it no longer stay disabled until a restart.
- The dashboard chat has a microphone button: record a voice message and it is transcribed like a Telegram voice note. It shows only when a `transcription` model role is set under Settings → Models.
- A file Archie sends in the dashboard chat is a download link for an hour, instead of a note that it can't be delivered.
- Typing `/model` or `/personality` on its own in the dashboard chat offers the choices as buttons.
## [1.50.1] - 2026-10-08
### archied
- When an update is rolled back, the log names the health check that failed instead of only "unhealthy".
## [1.50.0] - 2026-10-08
### archied
- Tools that need your approval ask for it again, and Archie can ask you a question or offer choices mid-reply. Since the services were split these never reached Telegram or the dashboard: approval-gated tools failed and questions were never asked.
- The dashboard chat shows approvals as Approve / Always this session / Deny, choices as buttons, and questions with a reply field.
-`/update` in the dashboard chat lists what's available with Install and Not now.
- Settings → Status → Versions installs the update it shows; its Install button sent an empty request.
## [1.49.4] - 2026-10-07
### archied
- Settings → Status and Settings → Extensions are split into tabs instead of one long page; the Versions table's status column ends at the card's edge.
- Tools & MCP has one "Add MCP server" button; the transport is chosen in the form, and an unnamed new server is not an unsaved change.
- Settings → Repositories shows the add field when no repositories are configured, instead of a blank page.
- The unsaved-changes bar always rests at the bottom of the window.
## [1.49.3] - 2026-10-07
### archied
- Settings → Status → Versions shows the Gateway as "Update available" with an Install button when a newer release exists; it read "Unknown" with no way to install. The Runtime row stays "Unknown" until an agent task has run.
- The release channel buttons sit at the Updates card's right edge instead of mid-row.
## [1.49.2] - 2026-10-07
### archied
- Carries the 1.49.0 and 1.49.1 changes, whose builds were never published. The update check reads GitHub releases directly and still offers only releases with a verifiable linux-amd64 zip.
## [1.49.1] - 2026-10-07
### archied
- When the dashboard session expires, the page returns to the sign-in screen instead of showing errors on every page until a manual refresh.
## [1.49.0] - 2026-10-07
### archied
- Extensions that declare no egress hosts (vault, email, gitea) reach the network again; only packages that declare their hosts are confined to them. The Accept dialog shows "network: unrestricted" for the rest.
- The update check finds releases itself, and reuses a found release for ten minutes so repeated checks stay under GitHub's rate limit.
## [1.48.1] - 2026-10-07
### archied
- **Settings → Status → Updates** now chooses only the release channel (stable, prereleases, or a pinned version). Update checks and installs always run the `archie-update-*` scripts installed beside the binaries; the dashboard can no longer set the command that runs.
## [1.48.0] - 2026-10-07
### archied
- **Settings → Status → Updates** edits the update check and install commands. They default to the `archie-update-*` scripts installed beside the binaries, so a zip install shows **Install** on the Versions card with nothing configured. The `update_check_command` and `update_install_command` keys under `[chat.telegram]` are no longer read; remove them from `config.toml`.
-`archie-update-install` run from a shell now reads `~/.config/archie/env`, so the pre-update backup of the bundled database no longer fails with `no password supplied`. Run it with `--auto` to install the newest release.
## [1.47.3] - 2026-10-07
### archied
- **Settings → Extensions**: **Accept** in the authority review now accepts the extension, and **Remove** removes it. Both previously closed the dialog without doing anything.
## [1.47.2] - 2026-10-06
### archied
- **Events → Inspector** now lists your capture sources with their real URLs and a **New source** button, replacing the `/webhooks/capture/<source>` placeholder. Sources no longer sit on the Bindings tab.
## [1.47.1] - 2026-10-06
### archied
- The bundled PostgreSQL has no network and publishes no port: the services reach it through its Unix socket under `~/.local/share/archie/postgres`, so it no longer collides with another PostgreSQL on 5432. Leaving the database question blank in `archied setup` selects it.
- The installer does not start the services when the bundled PostgreSQL fails to start; it names the command to read its logs.
- On hosts that restrict unprivileged user namespaces (Ubuntu 23.10+), the installer prints an AppArmor profile allowing them for the Archie binaries only.
## [1.47.0] - 2026-10-06
### archied
- Install with one command: `curl -fsSL https://raw.githubusercontent.com/samcharles93/archie-core/main/install.sh | bash` downloads this release, verifies its checksum and runs `archied setup`. `--from-source` builds a checkout instead.
-`archied setup` asks for the PostgreSQL URL. Left blank, it uses the bundled Compose database with a generated password stored in `~/.config/archie/env` as `PGPASSWORD`, not in `config.toml`.
- The bundled PostgreSQL listens on 127.0.0.1 only. A database created before this release keeps its old `archie` password; enter its URL at setup or recreate the volume.
- The release zip carries `docker-compose.yml`.
- Extensions need unprivileged user namespaces, which Ubuntu 23.10 and later restrict. Allow them for the Archie binaries with an AppArmor profile; from the next release the installer prints it. Do not disable the restriction system-wide.
- fix(app): assign the temp-file close result on the error path
- fix(webhook): set a ReadHeaderTimeout on the forge webhook receivers
- fix(forge): refuse a review line number that does not fit an int
- fix(storepkg): mask the tar mode to the permission bits before narrowing
- fix(webui): navigate the Events chain once, not twice
- feat(tools): fail the gate when docs cite a path that no longer exists
- fix(configuration): make bot_user required, defaulted, and named
- feat(workflow): add the command.run step type
- fix(controlplane): an absent MCP server field inherits the file value
- fix(build): restore the go fix fixpoint, and give the formatter one owner
- fix(archied): restore contextcheck directives and drop unused adapter
- feat(secretengine): serve secret engines as go-plugin extensions
- refactor(statestore): own package for the State Store service; access reset moves to archie-state-store
- refactor(archied): gateway owns model work; daemon drops chat runtime, tools, memory and curators
- refactor(archiegateway): own package for the Gateway service
- fix(services): services wait for peers instead of exiting; restarted broker keeps its endpoint
- refactor(archieplaybooks): fold archie-playbooks into archied playbooks lint|serve
- refactor(agentrun): agent stage contract moves to the domain layer
- refactor(agentexec): model loop moves to agentexec/modelloop
- fix(configuration): bindings encryption keys must use the env engine
- feat(storepkg): fetch packages from any registry, plain HTTP on loopback only
- feat(webui): install, accept and enable extensions from the dashboard
- feat(presence): every service re-stamps a presence record in the State Store
- refactor(plugin): delete Yaegi daemon plugins and plugin_dir
- refactor(module): the log action is built in; delete the module loader and reconciler
- refactor(skill): delete Yaegi skill scripts and the run_go_script tool
- refactor(examples): the firewall workflow moves to archipelago
- feat(presence): services card on the status page and archied status
- feat(archiemessaging): verify update reports against archied's presence and restore release announcements
- fix(configuration): an overlay stands in for a missing config file; dev overlay is complete
- feat(access): edit org, workspace and object policies from the dashboard; refuse owner lockout
- feat(access): instance network rules at the capture receiver; policies reload without a restart
- feat(staterpc): attribute State Store calls to the calling service; policy audit records it
- feat(controlplane): playbooks and agent profiles install from packages; the daemon reads eda-playbooks live
- feat(forgeext): forge surface served by extensions; forge.type names the installed package
- refactor(forge): github and gitea leave core; webhooks parse in the forge extension
- feat(staterpc): the State Store derives org and actor from the principal archie-ui forwards
- feat(channelext): chat channels served by extensions; messaging runs the enabled ones
- refactor(channels): webhook and email run only as extensions; their channel settings go
- feat(skills): skill packages project into a skills resource the gateway reads live
- fix(gatewayrpc): sender_id and rate_limited cross the chat wire
- fix(controlplane): change history names kinds and reads only the caller's org
- feat(contracts)!: requests no longer name their org; the State Store derives it from the caller
- feat(identity): personal API tokens, created and revoked from the dashboard, act as their owner
- fix(archieui): a sign-in provider outage is a health issue, not a startup failure
- feat(staterpc): one run credential per task, kept in the State Store, authorizes its store calls and its push
- fix(forgerpc): forge calls need the run credential and reach only the run's own repository
- feat(controlplane): identity credential grants edited from the dashboard and applied live
- feat(daemon): a workflow that names an identity runs as it; the dispatcher needs run on the workflow
- feat(staterpc): every run start is audited by the State Store, or the run credential is withdrawn
- refactor(forgerpc): identity RPC subjects are keyed by identity ID
- fix(nats): containers log in with their run credential and reach only their task's subjects
- feat(egress): the run credential is the proxy login; Kit secrets resolve per request from live grants
- fix(webui): bind the container runtime document's keys, drop the blank Advanced page
- fix(webui): drop the repository review switch the server no longer accepts
- feat(controlplane): serve the step vocabulary in the workflow-definitions schema; the editor checks step types against it
- fix(ui): drop the topbar nav's edge fade that clipped the first item
- refactor(workflow): delete the bootstrap smoke-test workflow and its intake kind
- feat(workflow): step ids, {{ }} references to earlier results, agent.run result schemas, workflow.finish and on_failure
- feat(workflow): repository step types; implement and tdd ship as YAML in general steps
- feat(workflow): when conditions, handoff, human approval and forge steps; feasibility and triage ship as YAML
- feat(workflow): retries, parallel branches, review steps; every shipped workflow is YAML and the per-workflow step types are gone
- feat(ui): workflow canvas renders each definition as a step graph with data edges, parallel branches and conditions
- feat(ui): the workflow canvas watches a run live: each step shows its state, duration and error, and the view follows the step in progress
- feat(controlplane): serve each step type's settings schema; the workflow editor checks settings before save
- feat(ui): build workflows on the canvas: step palette, schema-driven settings forms, references to earlier results, reorder and remove
- feat(ui): the canvas Start node lists what starts the workflow: issue routes, event bindings, playbooks and other workflows
- feat(ui): canvas authoring by right-click menu and + insertion points; steps edit in a slide-in panel and show what they do
- fix(ui): workflow page header is one tab row with save and a more menu; drop the ID field, step list, version footer and the meaningless origin pill
- feat(ui): drive workflows from the canvas: run a workflow, act on the watched run, edit workflow settings from the Start node; the canvas fills the viewport
- feat(ui): inspect workflow step runs from canvas
- feat(workflow): resume a parked run from a chosen step
- feat(ui): bind an event to a workflow from its Start node
- fix(ui): reveal signing secret in canvas source creation
- feat(ui): select review gate findings before approval
- fix(ui): load task debug reliably and copy JSON output
- fix(postgres): queue a review that arrives during a remediation
- fix(ui): keep JSON copy inline on hover
- fix(webui): stop returning database_url from /api/config
- refactor(config): drop unused dispatch state labels
- feat(gateway): serve the dashboard skills and curators over ChatService
- refactor(archieui): leave channel reload unserved by the gateway
- feat(releaseupdate): install from release artifacts with journaled rollback, topology check and channels
- feat(gateway): load SOUL into the chat prompt per turn
- refactor(config): drop the unwired artifact sender and [artifacts] config
- feat(messaging): serve MessagingService.Deliver and deliver chat schedules through it
- refactor(gateway)!: drop budget_key with the webhook chat channel
- refactor(configuration): delete the dead runtime config overlay
- fix(daemon): record terminal non-dispatch outcomes so a capture is evaluated once
- fix(daemon): refuse a disabled workflow on every start path
- feat(telegram): carry inbound media through the chat turn
- fix(prsource): use a CodeQL-recognised containment guard when extracting archives
- feat(store): key control-plane resources by (org, kind)
- feat(controlplane): carry the caller org from the request principal
- feat(kitrun): render the OAuth credential file with sentinels
- feat(store): record accepted package authority against the pin
- fix(workflow): the own-PR flow no longer parks on the operator-approval gate
- feat(egress): capture the OAuth scope set and carry it to the harness secret
- feat(kitrun): render the OAuth scopes and omit an uncaptured primary key
- feat(store): project installed package contributions into org resources
## [1.44.1] - 2026-09-29
### archied
Two fixes to tasks that could not get past their workflow definition.
- **Approving a task no longer parks it again.** A task requeued under a
different workflow kept the previous run's definition pinned, so the worker
refused to compile the dispatch — it named `feasibility` while the row named
`implement` — and the task parked immediately, identically on every further
approval, which left `decline` as the only working operator action.
The daemon now re-pins whenever the pinned definition's id disagrees with the
task's workflow. A pin that is present, digest-valid and id-consistent is
still a strict no-op, so an operator's own definition override survives a
dispatch unchanged.
- **A shipped workflow definition now reaches an existing install.** A stored
seed was consulted only for a resource the store did not already hold, so a
document that changed in the build never reached a database an earlier
release had seeded. For workflow definitions that is a total outage rather
than a stale setting: the collection validates as one document, so a stored
step type this build no longer has failed every task's pin, whatever workflow
the task named — and the documented recovery, removing the resource and
restarting, wrote nothing either, because the store answered the seed's known
request ID from a history that outlives the resource. A seed now refreshes a
kind it wrote the newest revision of and re-creates a resource that is gone,
while an operator's own replacement is never undone.
### archie-agent
The runtime image is rebuilt with this release and links the shared workflow
package carrying the definition-id helper above. Hosts that run agent
containers need `docker compose pull agent` after updating to pick it up.
## [1.44.0] - 2026-09-29
### archied
Archie can now review pull requests.
- **Reviews on request and by watch.** Ask in chat or on the dashboard work form, add a repository to the watch list, or just let archie review its own PRs before it opens them. Review intensity follows a depth dial (quick/standard/deep) classified from the size of the change, and every finished review passes a verification layer — coverage-gap and cross-finding consistency checks — before it is produced.
- **No forge credential reaches the review sandbox.** The daemon prefetches the pull request's data and rebuilds its source snapshot over the forge's HTTP API, so the agent container works from an isolated copy with no read access to the repository's credentials.
- **Reviews stop at the operator gate before posting.** `review.precision_gate` / `approve_before_post` decide whether a finished review posts itself or parks for operator approval. With this release the parked state is a stop sign, not a checkpoint: the approve/reject/re-review responses behind the gate are not wired yet, and the gate's settings are not yet editable in the dashboard (configure them in `config.toml`). A parked review sits until that follow-up lands.
- The adversarial self-review pass archie previously ran before opening its own PRs is superseded by this pipeline and has been removed.
- Hardened harness input handling: harness identifiers are bounded to integer types.
### archie-agent
The runtime image is rebuilt with this release; it links the shared pr-review workflow packages behind the reviews above. Hosts that run agent containers need `docker compose pull agent` after updating to pick it up.
## [1.43.0] - 2026-09-28
### archied
- **Organisations.** Tasks, identities and settings now belong to an org. An
existing install is upgraded into a default org when the State Store first
starts; the upgrade resumes if interrupted. Task de-duplication is scoped
per org and identity.
- **Access policies are enforced** at the dashboard, the API and task
dispatch, with shipped roles and a rule that nothing crosses between orgs.
Denials are recorded and reported on the health page. If a policy locks
you out, `archied access reset --org <org>` (or `--instance`) on the State
Store host restores the shipped defaults.
- **Workflows can call workflows** with a `workflow.call` step. Inputs and
call cycles are checked when the workflow is saved, and the caller waits
on the callee's result.
- **Runs record each step.** A run's stages and agent calls are stored as
steps, the task detail page reads them, and stopping a task or archiving
it goes through one cancel path. After a crash, steps left running are
marked interrupted. Archiving a task removes its worktree.
- **Model roles, repositories, scheduling policy, providers and agent
profiles apply without a restart.**
- **Kit harness profiles:**
-`kit` is now one digest-pinned reference, a workload Kit or a published
Kit set, not a list. **Rewrite `kit = [...]` in `config.toml` or the
agent-profiles settings as the single reference**; a list no longer
loads. Compose mixins by publishing a Kit set.
- OAuth logins are handled on the host: the egress proxy refreshes tokens,
stores them encrypted, and gives the container only placeholders.
- A Kit's skills request mounts `skills_dir` read-only, and its
instructions file (such as `CLAUDE.md`) is written beside the workspace,
which is now `/archie/workspace`.
- A run still cannot be granted the credential a Kit needs, so a Kit that
requires one is refused at launch.
- Rate-limited webhook deliveries get `429`.
-`archie-gateway` and `archie-state-store` report ready to systemd.
### archie-agent
- Runs workflow calls, records its steps and agent calls, and runs Kit
harness stages under the profile's Kit.
## [1.42.0] - 2026-09-26
### archied
- **The dashboard is rebuilt on a new Graphite theme.** Settings moved to its
own sidebar with one save flow across every page (Channels, Tools & MCP,
Scheduling policy, Personas and Schedules, Identities, Plugins, Container
runtime, and a History of past changes). The top bar, Dashboard, Workflows,
task detail, the New task dialog and the Events page are all new: Dashboard
leads with what needs you, a run's stage rail and detail panels sit
side by side, Workflows shows per-workflow stats including completed runs,
and Events states capture status with a copyable capture endpoint. Live
updates share one stream and reopen after a drop instead of going quiet.
- **Settings changes are audited.** A field-level audit table records who
changed what, with a view on each settings page.
- **A task can carry a whole-run wall-clock limit**, separate from a stage's
own budget.
- **A run that makes no changes now ends as completed and its worktree is
cleaned up**, rather than left in a state Workflows didn't count.
- **Abandoning a task no longer closes its forge issue.** Only the workflow's
own terminal outcomes do that now.
- **A task whose container exits before the worker replies is parked**
instead of left running with no way to finish.
- **A worktree still holding uncommitted work is kept**, rather than reset,
when its task reaches a terminal state.
- **A provider's stored settings no longer get corrupted with a process-local
placeholder in place of your configured secret reference**, and archied
rejects a stored value shaped like one on the way back in.
- **Kit v3 harness profiles.** A `[containers.profiles.<name>]` entry can now
name a Kit v3 image (`kit = [...]`, pinned by digest) instead of a plain
container image, running the task's agent stages on an external CLI --
Claude Code, Codex, Pi, OMP or GitHub Copilot CLI -- inside an isolated
sandbox network. This release lands the daemon-side plumbing (egress
proxy, sandbox network, credential injection points); it does not yet ship
a way to grant a run's identity the credential a Kit needs, so a Kit
requiring one is refused at launch until a later release adds it.
-`task dev` now starts the State Store and waits for it before the rest of
the stack.
- Every service binary the installer builds is stamped with its version.
### archie-agent
- Carries the same task-lifecycle fixes as archied above (no-change runs,
parking on an early container exit, and the abandon/forge-issue fix), plus
the Kit v3 harness runner: a stage can now drive an external CLI
headlessly, read output from Claude Code, Codex, Pi, OMP or GitHub Copilot
CLI, and serve it capture tools over MCP.
- Claude's cached tokens are counted as prompt tokens, matching the built-in
agent loop's accounting.
## [1.41.2] - 2026-09-25
### archied
- **`/update` no longer offers an old runtime.** The runtime has shipped under
the release version since the version streams merged, but the update check
still read the retired runtime tags, so a current host was offered runtime
1.35.0 as an update. Do not approve that offer on 1.41.1; update to 1.41.2
instead.
- **`/version` reports the runtime version.** Binaries from the release zip
showed `Runtime: dev`.
## [1.41.1] - 2026-09-25
### archied
- **First published build of 1.41.0.** The 1.41.0 tag produced no release
artifacts; 1.41.1 carries everything listed under 1.41.0 below, including
the PostgreSQL 18 requirement and the removed config keys.
## [1.41.0] - 2026-09-25
### archied
- **Archie now stores everything in PostgreSQL 18, and `database_url` is
required.** Tasks, events, captures, bindings, settings and chat
conversations are served from the database `database_url` names; the State
Store, archied and the Gateway refuse to start without it, and refuse a
server older than PostgreSQL 18. `docker compose up -d postgres` starts a
matching local database with the default URL in `config.example.toml`.
- **Existing SQLite data is not carried over.** This release reads no SQLite
file and ships no importer, so an upgraded install starts with empty task,
event and conversation history. `db_path` is gone; `state_dir` (default
`~/.local/share/archie`) now holds the embedded NATS store and task logs.
- **Backups are whole-database snapshots.** `archie-state-store backup` and
`restore` work on the PostgreSQL database through `pg_dump`/`pg_restore`,
which must be on `PATH`. There is no automatic schema rollback: the way back
from an upgrade is restoring the snapshot taken before it.
- **Events carry a type, and bindings pick one.** Archie infers an event type
from captured payloads; the Inspector shows proposed and unidentified
events and lets you name them. Mappings are per event type and show how
many captures they match, a source can feed several bindings, and a binding
chooses an event type plus an optional filter. An unidentified event does
not dispatch.
- **Sources own webhook signing.** Each source gets a UUIDv7 path and its own
signing secret, or can be explicitly approved to accept unsigned events. A
new binding starts pending approval.
- **EDA playbooks can run module actions and take workflow inputs.** Action
playbooks run at most once per event through the dispatch ledger, a binding
can pass inputs to its workflow, the repository is optional, and a workflow
can name an agent profile. `archie-playbooks lint -eda-dir` checks a
directory, and `archie-playbooks serve` publishes the same findings to your
# ── Go ────────────────────────────────────────────────────────────────
# ── Go ──
# Reuse the builder's toolchain so the runtime Go can't drift from the one
# archie-agent was compiled with.
COPY --from=builder /usr/local/go /usr/local/go
@@ -58,15 +55,15 @@ ENV GOPATH="/go"
# /go/bin must be on PATH or anything `go install` puts there is unreachable.
ENVPATH="/usr/local/go/bin:/go/bin:${PATH}"
# Pinned release binaries. Building these with `go install` pulled ~2GB of
# module and build cache into the image. delve is omitted because it ships no
# prebuilt binary; `go install ...@latest` at runtime if an agent needs it.
#
# golangci-lint owns ordinary source formatting and lint checks. Standalone
# gofumpt is retained for generated protobuf contracts in tools/proto.sh.
ARGGOLANGCI_LINT_VERSION=2.13.2
ARGGOLANGCI_LINT_VERSION=2.14.0
ARGGOFUMPT_VERSION=0.11.0
ARGBUF_VERSION=1.72.0
# Pinned to the versions tools/proto.sh installs; buf generate shells out to them.
ARGPROTOC_GEN_GO_VERSION=1.36.11
ARGPROTOC_GEN_GO_GRPC_VERSION=1.6.2
# Repository gates run `task`; fetching it per run parks the task when the
# download fails.
ARGTASK_VERSION=3.54.0
RUN curl -fsSL "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz"\
| tar -xz -C /usr/local/bin --strip-components=1\
@@ -75,16 +72,31 @@ RUN curl -fsSL "https://github.com/golangci/golangci-lint/releases/download/v${G
| **Source** | Receive events from a system such as a firewall, monitoring stack, service desk, or forge. Configure its endpoint and signing requirements. |
| **Event type** | Identify which kind of event arrived from its headers and payload. Infer a schema from captured events or a pasted example. |
| **Mapping** | Extract named, typed parameters from the event. Reuse a mapping across bindings and see how often it matches. |
| **Binding** | Select a workflow, filter the events that should trigger it, and supply its inputs from mapped values or constants. |
| **Workflow** | Define the stages of work, their inputs and outputs, and the agent profile to use. Call other workflows when work needs another specialist or process. |
| **Agent** | Execute the work in a container with the tools for its purpose, acting under its own identity and granted permissions. |
A single source can produce several event types. An event type can feed several
bindings, and each binding can apply its own conditions. This lets the same
incoming data drive different responses without building a custom integration
for every workflow.
For example, a firewall sends a blocked-connection event. Archie identifies the
event type and maps the source address and severity into an investigation
workflow. A network investigator gathers evidence, assesses the activity, and
returns its findings. The workflow could then call a separate containment
workflow, subject to the permissions and approvals configured for that action.
The same model supports other processes:
- **Infrastructure operations:** A monitoring alert starts a diagnostic workflow
to inspect a service, collect evidence, and propose or perform an authorised
recovery action.
- **Service management:** An incoming request supplies the parameters for a
triage, investigation, or fulfilment workflow.
- **Software delivery:** A forge event starts a review or implementation
workflow with the repository's toolchain, validation steps, and pull request
as its output.
These are examples of workflows you can build. Their behaviour comes from the
workflow, tools, and access you configure.
## Agents equipped for their work
An agent profile selects the container image and available tools. You can supply
images with the software needed for a particular environment: network utilities
for an investigator, operational tooling for a systems agent, or a language
runtime and test framework for repository work.
Workflows declare structured inputs and can return structured outputs. They can
run with a scratch workspace, require a repository, or accept one optionally. An
investigation can finish with a report; a maintenance workflow can finish with
an operational result; a coding workflow can finish with a pull request.
Workflows can also call other workflows and pass data between them. Each called
workflow has its own run and agent profile. A caller can wait for the result or
continue while the called workflow runs independently.
The archipelago marketplace's `workflows/firewall` package is an example of a
workflow that uses typed inputs, a network investigator profile, and no
repository.
## Identities and controlled execution
Agents act as their own identities, with secrets and permissions granted to
that identity. Runs receive credentials scoped to their task; event data
supplies inputs and cannot grant access. Organisations, workspaces and
policy-based access control are in progress.
## Building and operating automations
The dashboard brings together event inspection, mappings, bindings, workflows,
and task activity. The intended authoring path starts with a real payload or an
example: identify its structure, map the fields you need, select a workflow, and
approve the binding.
Sources default to signed delivery; an unsigned source must be explicitly
approved. Binding changes require re-approval before they can dispatch work.
## Run it on a server
You need x86_64 Linux with curl and unzip, Docker (agents and the bundled
PostgreSQL run in containers) and a model: local [Ollama](https://ollama.com)
| Task outcomes | `GET /api/tasks` | the share of finished tasks that parked or died rose more than 10 points |
- **Control.** The canary's own window before the release was installed. With
one production host there's no simultaneous control.
- **Window.** 24 hours counted from the **install** on the canary, not from
the release's issue time: the host records it in `installed.json`
(`committed_at`) and reports it as `installed_at` in `GET /api/chat/update`.
One cycle of schedules and traffic. The first 30 minutes are for the install
and restart. `canary.yml` passes `-window` when the `CANARY_WINDOW` Actions
variable is set; the flag defaults to 24h. A host that doesn't report an
install time degrades to the release statement's issue time.
- **Hard signals** (install, readiness, alerts) roll back at any check after
that. **Relative signals** (errors, tasks) are judged against the baseline
whenever both windows carry enough data, so a breach rolls the release back
even mid-window; a full window with no failure promotes it.
- **Too little data skips a signal** rather than failing it: fewer than 5
finished tasks in the window, or an error log that reaches back less than an
hour into the baseline. A log read that stops short of a window is scaled to
a full window from what it covers.
### Queueing
`deploy.yml` installs each new release on the canary with
`archied release canary start -version V`, which first points the canary back
at `next` (clearing any rollback pin) and then installs `V` — unless the
canary is already judging a release newer than stable that isn't `V`, in which
case `V` is **queued** behind it and the canary keeps running what it judges.
`-force` installs regardless. A `check` that promotes (or finds nothing to
judge) installs the newer `next` in the same run, so a queue drains one
release per promotion.
### Subcommands
```
archied release canary status read-only: channel/pin, installed release and
installed_at, stable/next, window progress, and
the verdict the current signals would give
archied release canary start point the canary at next and install -version,
queued behind a release being judged (-force to
override)
archied release canary check judge the installed release over -window
(default 24h): promote, pick up a newer next,
or roll back; a held canary is reported, and a
held pin that is no longer installable fails
the run red
archied release canary promote promote the installed release now if its
signals pass; refuses with exit 1 otherwise
archied release canary unpin return the canary to next from any pin
```
### Promote
A release that passes the window is promoted: `stable` is retagged to the
`v<version>` manifest. The signature covers the statement, not the tag, so the
retag needs no signing key. The `archied` and `archie-agent` images' `:latest`
move to their `:v<version>` first, and the agent image must be the digest the
statement pins. Promotion refuses a prerelease and a release issued before the
one `stable` names, the same replay rule hosts enforce. The decision and its
reasons are in the `canary` run log.
Early promotion is a dispatch away: the **promote** workflow
(`.github/workflows/promote.yml`) takes a `version` input and runs
`archied release canary promote -version V` on the canary. It judges the
release the canary runs — the window doesn't matter for the decision — and
refuses (red run) on any hard failure or relative breach with enough data.
### Roll back
`stable` stays put, and the run turns red. Before the canary is pinned to
`stable`, `check` verifies `stable` is actually installable — its statement's
zip blob must still be in the release repository and its pinned agent image
must still resolve (`releaseupdate.Installable`). If it isn't, the run fails
loudly and the canary stays on `next` rather than being stranded on a pin.
Otherwise the canary is pinned to the `stable` version through its update
settings and reinstalled through its dashboard.
A release whose migrations differ from `stable`'s can't go back without
restoring the pre-update database snapshot, which loses every write since. The
canary is held on the failed release instead (pinned to it) and the fix goes
forward in the next release. The next release's deploy points the canary back
at `next`.
A pinned canary isn't judged, so a rollback is decided once — but `check`
verifies the pin is still installable every run, so a stranded pin shows red
instead of green. `archied release canary unpin` returns the canary to `next`
by hand.
### Configuration
| Name | Kind | Holds |
| --- | --- | --- |
| `CANARY_URL` | Actions variable | the canary's dashboard URL; unset disables the canary steps |
| `CANARY_TOKEN` | Actions secret | an API token bound to a dedicated `service_account` identity on the canary, carrying only the canary grant policy (see below) — never instance admin |
| `CANARY_WINDOW` | Actions variable | optional `-window` override for `canary check`; unset is 24h |
| `DEPLOY_TOKEN` | Actions secret | registry and repository write, for publishing, promoting and the release push; stays CI-only, promotion runs in CI and never on the host |
desc:Regenerate contracts and reject uncommitted generated differences
cmds:
- bash tools/proto.sh check
docs:generate:
desc:Regenerate the committed contract reference from Archie-owned types
summary:|
Writes docs/data/generated/contracts.json. The output is committed, so
this dirties the tree deliberately:review the diff and commit it with
the code change that shifted the contract surface. Never hand-edit the
artifact.
-mod=readonly is mandatory on every `go -C tools` command; see
task test:tools for why.
cmds:
- go -C tools run -mod=readonly ./docsgen --repo-root ..
docs:check:
desc:Verify the committed contract reference matches Archie-owned types
summary:|
Implements Step 6 of docs/architecture/generated-documentation.md:
generates into a temporary directory, compares it with the committed
output, names the authoritative Go definition behind each mismatch, and
exits non-zero without modifying the working tree.
Fix a failure with `task docs:generate`, then commit the result in the
same commit as the code change that shifted the contract surface. This
checks rather than regenerates on purpose:a gate that silently rewrote
the artifact would bless an unintended contract change with no reviewer
ever seeing it, which Step 9 explicitly forbids.
cmds:
- go -C tools run -mod=readonly ./docsgen check --repo-root ..
docs:prds:
desc:Reject session-bound writing in docs/prds
summary:|
A PRD states a decision, a requirement, a constraint or evidence. Those
survive the code moving underneath them. A line number, a progress
report or a dated status claim does not:it is true on the day it is
written and silently wrong a month later, while still reading as
authoritative. The tracker records progress; the PRD records the design.
Each finding names the file, the line, the rule and the fix. There is no
--fix:the replacement is a judgement about what the sentence was for.
cmds:
- go -C tools run -mod=readonly ./prdlint --repo-root ..
news:
desc:Regenerate the news page and per-version release notes from the changelog
summary:|
Writes docs/news/releases.json, docs/news/redirects.json and docs/news/.
The JSON is the canonical, host-neutral fact set every renderer reads;
the redirect table maps the retired /news/<component>/<version>/ URLs to
the unified page for that version; the markdown is the MkDocs adapter.
All of it comes from CHANGELOG.md, so cutting a release adds no writing
here.
The files are committed, so this dirties the tree deliberately:review
the diff and commit it with the changelog that produced it. Never
hand-edit a generated release page.
tools/release.sh --tag runs this before the release commit, and it skips
any file whose bytes already match, so a re-run leaves the tree clean.
desc:Regenerate the release data artifacts from the changelog
cmds:
- go -C tools run -mod=readonly ./newsgen --repo-root ..
news:check:
desc:Verify the committed release notes match the changelog
summary:|
Derives the release notes in memory and fails when the committed files
differ, without modifying the working tree. Runs in `task check`, so a
changelog edit cannot land without its regeneration.
A version page the generator does not produce (a page for a release the
changelog no longer carries, or one left in the retired
docs/news/<component>/ layout) is a finding too; a hand-written news item
belongs at the docs/news root instead.
cmds:
- go -C tools run -mod=readonly ./newsgen check --repo-root ..
docs:artifact:
desc:Regenerate the canonical docs artifacts from the Markdown sources
summary:|
Writes docs/data/generated/docs.json and dev-docs.json:every published
page's url, title, section and raw Markdown body, plus the sidebar tree
derived from the layout, one file per set. The JSON is the canonical,
host-neutral fact set a renderer reads; the Markdown stays the source.
MkDocs was the first renderer and the Astro app is the second, so the
artifact is the product.
Two sets, split by audience:the public set (served under /docs/) is what a
reader of the product needs, the development set (/dev/) is architecture/
and prds/. The split and the reasons for what is held back entirely --
archive/, inspiration/, news/ and the credential notes -- live in
tools/docsite/main.go, because a renderer reading an artifact cannot see
why a page is absent from it.
The files are committed, so this dirties the tree deliberately:review the
diff and commit it with the page that produced it.
The artifact's keys are a frozen contract:an application is built against
them, so renaming one breaks a consumer this repository does not compile.
cmds:
- go -C tools run -mod=readonly ./docsite --repo-root ..
docs:artifact:check:
desc:Verify the committed docs artifacts match the Markdown sources
summary:|
Reproduces both artifacts in memory and fails when a committed file
differs, without modifying the working tree. Runs in `task check`, so a
page edit cannot land without its regeneration.
The generated directory is accounted for by docsgen's generatedArtifacts,
which names both files alongside contracts.json:one registry for the
directory rather than one per writer.
cmds:
- go -C tools run -mod=readonly ./docsite check --repo-root ..
vet:
desc:Run go vet
cmds:
@@ -179,283 +86,169 @@ tasks:
lint:
desc:Run golangci-lint
summary:|
Both modules. ./... from the root stops at the root module, so the tools
module was never linted and drifted unseen -- the same hole task check
already closes for tests with test:tools.
cmds:
- golangci-lint run ./...
- task:lint:tools
lint:tools:
desc:Run golangci-lint over the tools module
summary:|
./... from the root stops at the root module, so the tools module was
never linted and drifted unseen -- the same hole task check already
closes for tests with test:tools.
dir:tools
cmds:
- golangci-lint run ./...
lint:playbooks:
desc:"Lint playbook binding dirs for collisions (standalone tool, cmd/archie-playbooks)"
summary:|
Runs the standalone playbook linter (archie-playbooks lint) against
./playbooks by default. It validates playbook YAML binding files
against the same loaders the daemon uses at startup, so a pre-merge
check can never disagree with runtime validation. Exit non-zero on
any collision / malformed file / invalid binding.
Lint a different set of directories directly:
go run ./cmd/archie-playbooks lint -dir ./a -dir ./b
cmds:
- go run ./cmd/archie-playbooks lint -dir ./playbooks
vuln:
desc:"Scan for known stdlib/dependency CVEs (govulncheck). Not part of task check: it needs network access to the vuln DB and is not build/test-blocking; run it explicitly or in CI."
cmds:
- govulncheck ./...
deadcode:
desc:"Report functions no shipped binary can reach (whole-program RTA from ./cmd/...). Not part of task check: it reports a standing backlog, so gating on it would fail every run until that backlog is zero."
summary:|
Answers "is this reachable in production", which no linter does:
golangci-lint's unused check is package-scoped, so anything exported
and called from a sibling package looks live even when no binary
reaches it.
Run via `go run ...@latest` deliberately. A locally installed deadcode
built against an older Go than this module exits non-zero and prints
NOTHING, which reads as "no dead code" instead of "analysis failed".
Building it against the repo toolchain makes that failure impossible.
-test=false is the point of the report:a function reached only by its
own tests is not reachable in production.
Read the output in one direction only. RTA over-approximates what is
reachable, so "unreachable func" is sound and worth acting on, while
silence proves nothing:interface dispatch and any address-taken
function (every reflect.ValueOf entry in the *extract tables) is
assumed reachable whether or not it is ever called.
cmds:
- go run golang.org/x/tools/cmd/deadcode@latest -test=false ./cmd/...
reachaudit:
desc:"Classify unreachable code as tracked / untracked / dynamic (tools/reachaudit). Wraps task deadcode with provenance and tracker status."
summary:|
deadcode says a function is unreachable. reachaudit says whether that
is a known gap, a forgotten one, or an artifact of runtime loading
(yaegi, reflection) that must never be deleted.
Two report sections, because a dead whole package and a dead symbol
inside a live one are different failure modes:"unreachable-*"is a
package no shipped binary imports at all; "in-package-*" is a symbol
dead inside a package that IS shipped -- the ChatCourier/Dispatch
shape, where the feature is wired everywhere except its own call site.
Both carry the same tracked/untracked/dynamic classification.
--refresh re-runs the analysis. Without it the tool reuses
/tmp/reachaudit-deadcode-<sha>.txt with no staleness check beyond HEAD
and a dirty-tree check, which will happily report last week's tree
against today's code if HEAD hasn't moved.
--json PATH and --md PATH write the same findings as structured data or
a Markdown report, in addition to the terminal summary.
desc:"Build the documentation site into ./site (MkDocs). --strict, so a dead internal link fails the build."
summary:|
Publishes docs/ minus the subtrees held back in mkdocs.yml's
exclude_docs. Requires mkdocs-material:
pip install --user mkdocs-material
Distinct from docs:check, which verifies the generated contract data
rather than the site.
cmds:
- mkdocs build --strict
docs:serve:
desc:"Serve the documentation site locally with live reload on :8000."
cmds:
- mkdocs serve
- cd tools && golangci-lint run ./...
ui:deps:
desc:Install the dashboard's node dependencies (ui/node_modules is gitignored)
desc:Install dashboard dependencies
internal:true
# Parallel UI checks must share one dependency install.
run:once
dir:ui
cmds:
- npm install --no-audit --no-fund
- pnpm install --frozen-lockfile
ui:
desc:Build the dashboard into ui/dist (committed; the Go build embeds it)
desc:Build the dashboard into ui/dist, which the Go build embeds
dir:ui
deps:[ui:deps]
cmds:
- npm run build
ui:check:
desc:Rebuild the dashboard into a temporary directory and reject a stale ui/dist
summary:|
ui/dist is committed because the Go build embeds it, so it is a generated
source file. Nothing else in the gate reads it and `task ui` rewrites it
in place, so before this a change to ui/src that landed without the
rebuilt bundle was invisible -- and two agents in two worktrees could each
"pass"while producing different dashboards.
Builds somewhere temporary and compares, never rewriting the committed
artifact, which is the rule docs:check already follows for the contract
reference. A gate that rebuilt ui/dist in place would bless an unintended
UI change with no reviewer ever seeing it.
Fix a failure with `task ui`, then commit the rebuilt bundle in the same
commit as the source change that caused it.
Declares ui:deps like `ui` and `test:ui` do, so a fresh clone works; that
means the gate runs `npm install` once for each dependent. Task's
sources/generates up-to-date check does not apply to a node_modules
directory, so the guard against that is a follow-up, not a claim here.
deps:[ui:deps]
cmds:
- bash tools/uidist.sh check
- pnpm run build
test:ui:
desc:Test and type-check the dashboard
dir:ui
# ui:deps so a fresh clone fails on a real error rather than on a missing
# node_modules, which is gitignored and installed by nothing else.
deps:[ui:deps]
cmds:
- npm test
- npm run typecheck
- pnpm test
- pnpm run typecheck
# A test event for the capture intake, so the Events surfaces can be driven by
# hand without a real webhook source. See tools/webhook-send.sh --list.
webhook:send:
desc:Send a test event to the dashboard's capture intake (--help for kinds)
bench:prreview:
desc:Run the PR review benchmark on the configured models and write docs/benchmarks/pr-review-*.md (-- -model ALIAS -judge-model REF; --help for flags)
cmds:
- bash tools/webhook-send.sh {{.CLI_ARGS}}
- go run ./cmd/archied prbench {{.CLI_ARGS}}
dev:
desc:"Develop: archied live-reload + archie-gateway + archie-state-store + archie-ui + Vite HMR together. Open http://localhost:5173"
summary:|
Runs the dev loop in one terminal:
desc:Run development services and Vite at http://localhost:5173
| `id` | text | The workflow's name. Required, unique. |
| `steps` | list | The steps, run in order. At least one. |
| `repository` | `required` \| `optional` \| `none` | `required` (the default) clones the task's repository into a worktree. `optional` clones one when the run names a repository and uses a scratch workspace otherwise. `none` never clones; only steps that run without a repository may be used. |
| `inputs` | mapping | Named, typed values whatever starts the run must supply: `{type, required}`, where type is `string`, `number`, `bool`, `object`, `array` or `any`. Steps read them as `{{ inputs.<name> }}`. |
| `outputs` | mapping | Named, typed results the run writes once each (same shape as inputs). A required output the run never writes parks it. A calling workflow reads them. |
| `profile` | text | The container profile (`[containers.profiles]`) the run's agents use. Resolved when the task is dispatched. |
| `identity` | text | The identity every run acts as, whatever started it. Empty runs as the starter. |
| `needs` | mapping | Harness capabilities the run requires: `captures` (bool), `gate_retries` (number). Declared outputs imply `captures`. |
## A step
| Field | Type | Meaning |
|---|---|---|
| `type` | text | The step type (below). |
| `id` | text | Names the step so later steps can read its result. Unique in the workflow; letters, digits, `-` and `_`. The run records the step under this name. |
| `settings` | mapping | The step type's settings. String settings may contain references. |
| `when` | condition | Skip the step unless the condition holds. |
| `on_failure` | `park` \| `continue` | `park` (the default) stops the run for an operator. `continue` records the failure and moves on. |
| `retry` | mapping | `attempts` (1 to 10) and `backoff` (a duration such as `30s`). A failed step runs again before `on_failure` applies. |
| `parallel` | mapping | Instead of `type`: named branches, each a list of steps, run at the same time. |
### References
Any string setting may contain `{{ path }}`, replaced when the step runs:
| Path | Value |
|---|---|
| `task.title`, `task.body` | The issue or chat request. |
| `task.prompt` | The title and body framed for an agent mission. |
| `task.repository` | `owner/name`. |
| `task.kind` | What the task came from, as prose: `GitHub issue` or `chat-originated task`. |
| `task.issue`, `task.pr` | Issue and pull request numbers. |
| `task.plan` | The plan a `workflow.approve` step handed over (an approved PRD). |
| `task.review` | The review comments a remediation round addresses. |
| `inputs.<name>` | A declared input; an undeclared one is refused at save. |
| `steps.<id>.summary` | What an earlier step reported, e.g. an agent's finish summary or a gate's output. |
| `steps.<id>.result.<field>` | A field of an earlier agent's structured result, or an output of an earlier `workflow.call` that waits. A field the agent's `result` schema or the callee's `outputs` does not declare is refused at save. |
Only earlier steps may be referenced; a reference to a later or unknown step is
refused when the definition is saved. A value that does not exist at run time
(for instance, a step that was skipped) renders empty.
### Conditions
`when` is a reference path, written without braces:
- `steps.assess.result.fit` holds when the value is true, a non-empty string other than `false`, or a non-zero number.
- `!steps.assess.result.fit` holds when it does not.
- `steps.classify.result.workflow == tdd` and `!=` compare the value as text.
natsURLFlag:=flags.String("nats-url","","NATS server URL (defaults to NATS_URL)")
stateStoreURLFlag:=flags.String("state-store-url","","State Store gRPC target (defaults to STATE_STORE_URL; required -- the legacy NATS storerpc path is deleted)")
stateStoreTokenFlag:=flags.String("state-store-token","","State Store bearer token (defaults to STATE_STORE_TOKEN)")
showVersion:=flags.Bool("version",false,"print the version and exit")
iferr:=flags.Parse(args);err!=nil{
iferrors.Is(err,flag.ErrHelp){
return0
}
return2
}
// The release and its updater read this line to prove a shipped
// archie-agent belongs to the release being installed.
t.Errorf("archie-messaging links %s (%s); the Messaging Service reaches that capability over a contract, never in-process (docs/prds/messaging-service-boundary.md, deletion gate)",importPath,category.name)
}
}
}
for_,exception:=rangegateExceptions{
if!linked[exception]{
t.Errorf("%s is excepted from the deletion gate but is no longer linked; drop the exception instead of leaving its prefix open",exception)
}
}
// A gate that cannot fail, and a `go list` that returns nothing usable, both
// read as a pass. This pins the one thing the loop above assumes.
fmt.Fprintf(flag.CommandLine.Output(),"usage: archie-state-store [flags] # serve the State Store gRPC contract\n\noffline recovery: archie-state-store <backup|restore|validate|rollback> -h\n\n")
fmt.Fprintf(flag.CommandLine.Output(),"usage: archie-state-store [flags] # serve the State Store gRPC contract\n\noffline recovery: archie-state-store <backup|restore|validate|rollback> -h | access reset -h\n\n")
t.Fatalf("validate exited %d on a store the daemon starts on: %s",code,stderr)
}
// A hand-edited value, or an older revision of one: the write path's own
// validator never inspects dispatch.trigger, so only the config gate
// catches it, and the daemon exits 1 on it (validateDispatch).
iferr:=execRaw(t,db,`UPDATE resources SET value='{"poll_interval":"1m","max_retries":3,"dispatch":{"trigger":"bogus"}}' WHERE kind='scheduling-policy'`);err!=nil{
t.Errorf("archie-ui links %s (%s); the UI process reaches that capability over a contract, never in-process (docs/prds/ui-service-boundary.md, deletion gate)",importPath,category)
}
// excepted reports whether importPath is allowed past the gate, recording
// which exception admitted it so a stale one is reported.
// contracts. It is the .5.2 companion to archie-gateway and
// archie-state-store: a thin main that parses process inputs and hands them
// to archieui.Run.
//
// See docs/prds/ui-service-boundary.md for the ratified boundary.
packagemain
import(
@@ -29,17 +27,13 @@ func run() int {
flag.StringVar(&options.Config,"config",configuration.DefaultConfigPath(),"configuration file or directory (only [services.*] targets and [web] are read)")
flag.StringVar(&options.Overlay,"config-overlay","","configuration overlay file or directory")
flag.StringVar(&options.Listen,"listen","","dashboard HTTP listen address (defaults to [web].listen, else 127.0.0.1:8484)")
flag.StringVar(&options.Token,"token","","dashboard token; required for a non-loopback listener")
flag.StringVar(&options.TokenFile,"token-file","","file holding the dashboard token, minted on first use")
flag.StringVar(&options.OidcIssuer,"oidc-issuer","","identity provider issuer URL; requests must then carry a token it signed")
flag.StringVar(&options.OidcAudience,"oidc-audience","","audience (resource identifier) this dashboard accepts tokens for; required with -oidc-issuer")
flag.StringVar(&options.OidcClientID,"oidc-client-id","","provider client id for browser sign-in; omitted means no sign-in flow")
flag.StringVar(&options.OidcClientSecretEnv,"oidc-client-secret-env","","name of the environment variable holding the sign-in client secret")
flag.StringVar(&options.OidcRedirectURL,"oidc-redirect-url","","callback URL registered at the provider (path must be /oauth2/callback)")
flag.StringVar(&options.Gateway.Target,"gateway-target","","archie-gateway gRPC address (defaults to [services.gateway].target)")
flag.StringVar(&options.Gateway.Token,"gateway-token","","bearer token presented to archie-gateway")
flag.StringVar(&options.State.Target,"state-target","","archie-state-store gRPC address (defaults to [services.state].target)")
flag.StringVar(&options.State.Token,"state-token","","bearer token presented to archie-state-store")
t.Fatalf("POST /webhooks/capture/demo = %d (%s), want 202: this process is the only listener serving intake after the cutover",accepted.status,accepted.body)
# playbook_dirs = ["~/.local/share/archie/workflows"] # list of dirs of *.yaml binding files, merged with the two above (slice 3); a key bound twice across sources is a load failure
# eda_playbook_dir = "~/.local/share/archie/eda-playbooks" # rich EDA playbook documents (one trigger; either a CEL-gated workflow action or a list of module actions); a matching workflow playbook decides the task's workflow ahead of the three binding sources above; distinct from playbook_dirs
# You are archie's self-intake curator, in dry run. Each pass: list recent
# task runs with run_list, inspect anything parked or failed with run_events,
# check issue_list for each repo so nothing already open is repeated, then
# report candidate follow-up issues, each tied to the run that produced it.
# Do not create issues.
# """
# To let it file: add "issue_create" to tools and tell it to file each
# candidate (citing the run) instead of only reporting it.
Loaded 100 of 2957 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.