288 Commits
Author SHA1 Message Date
sam a262151cb9 fix(daemon): park pr_open tasks on permanent forge resolution failures (#1975) 2026-11-14 20:09:19 +11:00
sam 9f830db510 fix(daemon): publish polled issues only from authors with write access (#1830)
The issue poller published title and body of every labelled or assigned
issue to the agent. It now keeps only write-access authors, failing closed
when the forge cannot answer. The filter moves to forge.WriterIssues,
shared with the issue_list tool.
2026-11-14 18:31:54 +11:00
sam 1d329bad35 fix(daemon): reclaim idle task clones hourly, not only on a full volume (#1814) 2026-11-14 15:05:53 +11:00
sam 5f45cdebb5 fix(daemon): reconcile PR state through the repository's org connection (#1872) 2026-11-14 12:03:40 +11:00
sam 44a7d59acf fix(daemon): log why a task's forge could not be resolved (#1872) 2026-11-14 11:56:53 +11:00
sam 3a965e2a4f feat(nats): an external broker defers logins to archie through auth callout (#1866)
Task containers log in with their run credential on an external broker and
reach only their own subjects, decided by the embedded broker's authenticator.
The broker token is never put in a container environment.
2026-11-14 04:04:15 +11:00
sam 5edf58fd68 fix(daemon): reconcile and merge tasks whose PR was merged on the forge (#1872)
ListOpenPRs dropped org_id, so the reconciler resolved the forge and
worktrees in the default org instead of the task's own and skipped the
task silently. Select the org, log a skipped task, and let the Merge
action succeed when the forge reports the PR already merged.
2026-11-14 04:01:31 +11:00
sam da1795c597 feat(egress): Docker task containers reach allowed hosts through the egress proxy (#1967)
The task session carries containers.egress_hosts and the profile's remote MCP
hosts, and the container gets ProxyEnv with the relay exempt from the proxy so
the State Store and NATS dials bypass it. A host the session lists exactly may
resolve to a private address; wildcard and any-host matches may not.
egress_hosts moves from openshell to containers, as it applies to both runtimes.
2026-11-14 04:01:31 +11:00
sam 7d6f22d227 fix(daemon): a per-task stop interrupts a resumed run reacquiring capacity (#1937) 2026-11-14 03:51:03 +11:00
sam d3678869d2 feat(archied): OpenShell tasks get model keys through gateway providers (#1864) 2026-11-14 03:33:36 +11:00
sam 2096ae8267 feat(openshell): each sandbox's network policy admits only what its task needs (#1864, #1967)
Runtimes now take a task launch: image, mounts, env, the daemon's NATS
and State Store with the task's credentials, its model providers and the
hosts its tools may reach. Docker addresses them through the egress relay
as before. An OpenShell sandbox reaches NATS and the State Store over
plain TCP, the model providers with their credential bound, and the
task's remote MCP hosts and the allowed package registries; services
addressed by IP or loopback are named by the configured services host,
since sandbox policy admits only DNS names.
2026-11-14 03:24:37 +11:00
sam a1ec538a87 feat(openshell): task agents can run as OpenShell sandboxes (#1864)
Container runtime policies gain a runtime (docker or openshell) and the
OpenShell gateway's address, workspace and token, set on the container
runtime page and applied on restart. The OpenShell backend creates a
sandbox per task with the worktree and volumes bound in, reports when
the agent exits or outlives its maximum uptime, deletes the sandbox on
release, and sweeps this instance's leftovers at boot. Storage volumes
are created attachable to OpenShell sandboxes.
2026-11-14 03:07:57 +11:00
sam 45b9295cb7 refactor(daemon): tasks run through a TaskRuntime; the Docker pool is its first backend (#1864) 2026-11-14 02:58:26 +11:00
sam e7d3ed72e4 fix(container): task containers run on their own sandbox network behind the egress relay (#1867)
Each task container now gets an internal bridge with no host address,
shared only with the egress relay. NATS, the State Store and the model
proxy are reached through the relay's ports; a loopback State Store is
forwarded to the host gateway. The network is removed with the task, and
boot sweeps any a previous daemon left. The per-task State Store relay on
the host bridge is gone.
2026-11-14 00:14:21 +11:00
sam 41f44c43a1 feat(workflow): issue routing is a control-plane setting edited in the dashboard (#1959)
Label to workflow rules and a default workflow are the intake-routes
resource: ordered, case-insensitive, first rule wins, seeded with bug to
tdd, feature to feasibility, default triage. A write naming an undefined
workflow or an empty label is refused. The daemon reads it through the
workflow definitions client when pinning a task and at intake.

The kind indirection only carried this routing, so it is removed: the
per-kind NATS subjects (every consumer already bound archie.task.>) are
one subject, the envelope and playbook triggers lose their kind, and
x-intake-routes is dropped. The dashboard gets an Issue routing page
under Automation; the trigger card reads the same setting.
2026-11-13 20:28:52 +11:00
sam bdc457d11e refactor(daemon): identity, org and access checks are their own gate (#1934) 2026-11-13 04:20:41 +11:00
sam 500d02be78 fix(daemon): the task bus is its own type; a cancelled run stops waiting for its slot (#1932) 2026-11-13 04:17:46 +11:00
sam 0cd9cefd76 refactor(daemon): binding dispatch is its own type (#1930) 2026-11-13 04:15:14 +11:00
sam 0a770ed171 refactor(daemon): PR review scanning and reactions are their own type (#1933) 2026-11-13 04:13:36 +11:00
sam 0d13b919da refactor(daemon): issue polling is its own type (#1931) 2026-11-13 04:12:29 +11:00
sam 63a1750936 refactor(daemon): drop nil paths production never takes; one file per cluster (#1929) 2026-11-13 04:08:55 +11:00
sam afaea346ee refactor(access): authorization takes the caller's context instead of a stored one (#1925) 2026-11-13 03:54:05 +11:00
sam 68e8552f0d fix: log NATS ack and nak failures instead of discarding them (#1924) 2026-11-13 03:52:38 +11:00
sam db346b159d fix(webui): mark cookies Secure behind a TLS proxy; run gosec in the gate (#1919)
Cookies took Secure from r.TLS, which is nil behind a proxy that terminates
TLS, so sign-in cookies went out without it. Every dashboard cookie now goes
through one builder that reads the scheme the way the origin check does.

The worktree reset and the agent worker's chown walk use os.Root, so a
symlink swapped in mid-walk can't point them outside the worktree.

gosec runs in golangci-lint, tests included. G104, G115, G204 and G304 are
excluded in config; each remaining finding is fixed or suppressed at the site
with its reason.
2026-11-13 03:16:15 +11:00
sam 804d306f75 fix(daemon): skip issue intake when the routed workflow is disabled (#1913)
Quality / check (pull_request) Canceled after 0s
ci/woodpecker/pr/quality Pipeline was successful
pollNATS queued every discovered issue and let the pin path park it with
'workflow triage is disabled'. Now, after the TaskByIssue existence check
and before PublishTask, the label-routed workflow is resolved against the
active definitions and checked against the identity org's enablement, the
same filter dispatchOrgBindings applies to armed bindings. A disabled
route logs one Info line and returns false without acknowledging, so the
issue is rediscovered on a later poll and picked up if the workflow is
re-enabled. Read failures of org, definitions or enablement log a Warn
and fall through to publishing; no routable definition keeps the current
publish behaviour. processNATSTask's park path is unchanged.
2026-11-13 00:42:40 +11:00
sam f92c5b4536 chore(runtime): delete Kit and external agent harness support (#1877)
ci/woodpecker/pr/quality Pipeline was successful
Quality / check (pull_request) Canceled after 7m39s
Archie runs its own agent loop only. Removes Kit resolution and launch,
the harness runner and adapters, the setup terminal and sandbox view,
harness secrets and OAuth capture (table dropped in migration 0075), the
task-tools contract that only Kit containers reached, and the
sandbox-kit-spec dependency. Agent profiles carry image and tools only.
The egress proxy keeps the model-session path; the sandbox relay code
stays for #1867.
2026-11-12 21:29:05 +11:00
sam e3ffefdc7d fix(identity): use System as the one root identity and record who created every task (#1851)
deploy / plan (push) Successful in 25s
deploy / gate (push) Successful in 7m57s
deploy / agent-image (push) Successful in 21s
deploy / dist-zip (push) Skipped
deploy / archied-image (push) Successful in 2m12s
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.
2026-11-10 20:01:16 +11:00
sam 4b0adac674 fix(daemon): open the task log before the workflow-identity check so its parks are logged
deploy / plan (push) Successful in 6s
deploy / dist-zip (push) Skipped
deploy / gate (push) Successful in 8m37s
deploy / agent-image (push) Successful in 23s
deploy / archied-image (push) Successful in 2m4s
2026-11-09 13:55:19 +11:00
sam 561863613f feat(workflow): agent.run asks to continue when it reaches its step budget (#1832) 2026-11-09 09:41:46 +11:00
sam 3b840d7847 fix(daemon): drop PR review activity from authors without write access (#1830)
Adds a forge HasWriteAccess call; the review scan publishes only
collaborators' reviews and comments, and issue_list marks forge text
as untrusted.
2026-11-09 09:41:39 +11:00
sam c98666d6b7 fix(worktree): stale-clone reclaim keeps clones with uncommitted or unpushed work (#1829) 2026-11-09 09:41:33 +11:00
sam 055f2da9cd fix(daemon): reclaim stale task clones when the work volume is full; clean up dead tasks too (#1829) 2026-11-09 09:41:33 +11:00
sam 031291a4bf fix(daemon): clone free-space floor is 1 GiB, not 5; clones share the mirror's objects
deploy / plan (push) Successful in 7s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 3m17s
2026-11-09 09:00:46 +11:00
sam 472478cf83 refactor(state): delete the unused ArmedBindingsForSource RPC and query
deploy / plan (push) Failing after 2s
deploy / gate (push) Skipped
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
2026-11-09 01:22:02 +11:00
sam 2d51cf5106 perf(daemon): dispatch captured events every second instead of every poll_interval; match bindings in memory
deploy / plan (push) Failing after 2s
deploy / gate (push) Skipped
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
2026-11-09 01:19:50 +11:00
sam 17e6e66e72 refactor(archied): delete the file-configured forge webhook receiver; forge webhooks arrive through event capture (#1817)
deploy / plan (push) Failing after 2s
deploy / gate (push) Skipped
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
2026-11-09 00:50:00 +11:00
sam 52b5740c39 fix(daemon): cap tasks per issue poll and wait for disk before cloning (#1805)
deploy / plan (push) Successful in 1m6s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
deploy / gate (push) Canceled after 11s
2026-11-08 17:26:00 +11:00
sam 860b2c85e0 fix(taskstate): retry transient parks with backoff, escalate when exhausted (#1804)
deploy / plan (push) Successful in 16s
deploy / gate (push) Canceled after 2m21s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
2026-11-08 17:19:14 +11:00
sam 558659bcf4 test(daemon): adopt go fix's promoted-field literal (#1797)
Quality / check (pull_request) Canceled after 2m32s
2026-11-08 03:37:54 +00:00
sam 33f7323eb0 fix(daemon): claim and fetch tasks only while the dispatcher has room (#1797)
Quality / check (pull_request) Failing after 6m37s
2026-11-08 03:29:25 +00:00
sam 49d7619ba3 fix(daemon): claim a requeued backlog without a poll wait per task
deploy / gate (push) Successful in 4m56s
Quality / check (push) Canceled after 6m11s
deploy / archied-image (push) Successful in 3m1s
deploy / agent-image (push) Successful in 12s
deploy / dist-zip (push) Skipped
2026-11-08 06:24:54 +11:00
sam c30624a59e feat(workflow): a handoff starts a separate linked run of the next workflow (#1791)
Quality / check (push) Successful in 4m12s
deploy / gate (push) Successful in 4m42s
deploy / archied-image (push) Successful in 3m13s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
2026-11-03 20:56:03 +11:00
sam 3af96fd818 fix(daemon): watch the task intake loop too and name the stalled loop
Quality / check (push) Canceled after 26s
deploy / gate (push) Successful in 4m30s
deploy / archied-image (push) Successful in 2m50s
deploy / agent-image (push) Successful in 12s
deploy / dist-zip (push) Skipped
2026-11-02 00:26:50 +11:00
sam 1043982529 fix(daemon): stamp each run-loop cycle so the systemd watchdog keeps beating
Quality / check (push) Successful in 3m37s
deploy / gate (push) Successful in 4m27s
deploy / archied-image (push) Successful in 2m54s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
2026-11-02 00:22:24 +11:00
sam 3977eaad68 fix(workflow): make the repository optional for the triage workflow (#1578) 2026-10-31 00:36:10 +11:00
sam b5482857f8 fix(forge): accept invitations only to configured repositories
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.
2026-10-28 23:57:44 +11:00
sam 4bb473c0b0 fix(webui): resolve a selected org's workspaces as the caller, wire selection into gateway and harness, and let a member start tasks in the org they selected 2026-10-27 11:06:18 +11:00
sam c3d49cbc6c feat(webui): park model credential failures with a recovery link, add Model setup step, readiness badges, and move audit to the organisation 2026-10-27 11:06:18 +11:00
sam afdb4b203f feat(daemon): park repository, credential and forge-extension failures with a recovery link on the task list 2026-10-27 10:47:14 +11:00
sam 8150df8d81 feat(scheduling): resolve the issue discovery rule per organisation 2026-10-27 10:38:00 +11:00