Commit Graph
163 Commits
Author SHA1 Message Date
sam 8a6be134dc Merge pull request 'Feat/56 duplicate workflow warning fires on normal builtin overrides' (#76) from feat/56-duplicate-workflow-warning-fires-on-normal-builtin-overrides into main
Reviewed-on: sam/archie-core#76
2026-07-25 08:53:12 +00:00
sam 1975a3d842 Merge branch 'main' into feat/56-duplicate-workflow-warning-fires-on-normal-builtin-overrides 2026-07-25 08:53:02 +00:00
sam d5f3b5fe3d Merge pull request 'esc() misses single quotes, enabling attribute JS breakout in task row onclick (archie)' (#71) from feat/55-esc-misses-single-quotes-enabling-attribute-js-breakout-in-t into main
Reviewed-on: sam/archie-core#71
2026-07-25 01:30:09 +00:00
sam c603b3596d Merge branch 'main' into feat/55-esc-misses-single-quotes-enabling-attribute-js-breakout-in-t 2026-07-25 01:29:59 +00:00
sam a6c321475e Merge pull request 'metadata.archie.plugins frontmatter list is parsed but unused (archie)' (#72) from feat/50-metadataarchieplugins-frontmatter-list-is-parsed-but-unused into main
Reviewed-on: sam/archie-core#72
2026-07-25 01:29:52 +00:00
sam af9203bbd4 Merge branch 'main' into feat/50-metadataarchieplugins-frontmatter-list-is-parsed-but-unused 2026-07-25 01:29:41 +00:00
sam cec6dbcaf2 Merge pull request 'gofmt: fix misaligned TaskRef struct fields in storage.go (archie)' (#73) from fix/49-gofmt-fix-misaligned-taskref-struct-fields-in-storagego into main
Reviewed-on: sam/archie-core#73
2026-07-25 01:29:29 +00:00
sam 9c731710b3 Merge branch 'main' into fix/49-gofmt-fix-misaligned-taskref-struct-fields-in-storagego 2026-07-25 01:29:13 +00:00
sam fd0b60072e Merge pull request 'clip() can truncate strings mid-rune, producing invalid UTF-8 (archie)' (#74) from feat/47-clip-can-truncate-strings-mid-rune-producing-invalid-utf-8 into main
Reviewed-on: sam/archie-core#74
2026-07-25 01:28:47 +00:00
archie f83380e1bf clip() can truncate strings mid-rune, producing invalid UTF-8 (archie)
Implements #47
2026-07-24 18:06:37 +00:00
archie 6f72f38f5e fix: baseline gate repair (go vet ./...) 2026-07-24 18:04:15 +00:00
archie 8e76e5c7b3 fix: gofmt: fix misaligned TaskRef struct fields in storage.go (archie)
Fixes #49
2026-07-24 17:52:33 +00:00
archie af17f4cd66 test: failing repro for #49 2026-07-24 17:51:39 +00:00
archie ca92e24008 fix: baseline gate repair (go vet ./...) 2026-07-24 17:47:19 +00:00
archie 69b317a7c2 metadata.archie.plugins frontmatter list is parsed but unused (archie)
Implements #50
2026-07-24 17:42:17 +00:00
archie b4efcf84ba fix: baseline gate repair (go vet ./...) 2026-07-24 17:36:29 +00:00
archie 7632cba8e5 esc() misses single quotes, enabling attribute JS breakout in task row onclick (archie)
Implements #55
2026-07-24 17:33:22 +00:00
archie e4d1f728d7 fix: baseline gate repair (go vet ./...) 2026-07-24 17:28:19 +00:00
archie cc98d66bf2 Duplicate-workflow warning fires on normal builtin overrides too (archie)
Implements #56
2026-07-24 17:25:43 +00:00
archie c742e4243d fix: baseline gate repair (go vet ./...) 2026-07-24 17:12:17 +00:00
sam d4e4148b77 Merge pull request 'askpass helper rewritten on every git call despite "(once)" comment (archie)' (#68) from feat/59-askpass-helper-rewritten-on-every-git-call-despite-once-comm into main
Reviewed-on: http://git.catlow.cloud/sam/archie-core/pulls/68
2026-07-24 13:13:30 +00:00
sam 918b198258 fix: resolve merge conflicts with main 2026-07-24 23:12:25 +10:00
sam 8c961cad55 Merge pull request 'Add tests for Prepare's idempotent fast path and git error paths (archie)' (#69) from fix/58-add-tests-for-prepares-idempotent-fast-path-and-git-error-pa into main
Reviewed-on: http://git.catlow.cloud/sam/archie-core/pulls/69
2026-07-24 07:45:05 +00:00
sam d8379ecf22 Merge branch 'main' into fix/58-add-tests-for-prepares-idempotent-fast-path-and-git-error-pa 2026-07-24 07:44:55 +00:00
sam 4336dcf442 chore: remove task.json 2026-07-24 17:44:30 +10:00
sam 4d9e260046 fix: update gitignore 2026-07-24 17:43:00 +10:00
sam bb784297ae feat: fix webui task table and add merge-to-deploy automation
- webui: task rows referenced Go-style field names but store.Task
  JSON-marshals with lowercase tags, so every task row rendered blank
- add .gitea/workflows/deploy.yml: build+push archied and archie-agent
  images to the registry on merge to main
- docker-compose.yml: add a watchtower service so carina picks up new
  images and restarts the daemons without needing CI to SSH in
2026-07-24 17:22:19 +10:00
sam f2ce58e9f6 Merge pull request 'Prepare() treats worktree as ready from .git dir existence alone (archie)' (#70) from feat/57-prepare-treats-worktree-as-ready-from-git-dir-existence-alon into main
Reviewed-on: http://git.catlow.cloud/sam/archie-core/pulls/70
2026-07-24 07:20:55 +00:00
archie d2d10685e7 Prepare() treats worktree as ready from .git dir existence alone (archie)
Implements #57
2026-07-24 05:32:41 +00:00
archie cd2da34c39 fix: Add tests for Prepare's idempotent fast path and git error paths (archie)
Fixes #58
2026-07-24 05:28:19 +00:00
archie 7e723b47a0 test: failing repro for #58 2026-07-24 05:27:26 +00:00
archie e780596bf9 askpass helper rewritten on every git call despite "(once)" comment (archie)
Implements #59
2026-07-24 05:16:57 +00:00
sam 17307ef96e chore: ignore build and task directories 2026-07-24 13:51:00 +10:00
sam 6ebbd3b2cf fix: add missing LinkBranch stubs to test doubles
Fix go vet/test failures by adding LinkBranch methods to stubForge, prCapturingForge, testForge, and fakeForge. Update test data from 'sam/archie' to 'acme/widget' and state label defaults from 'archie:*' to 'agent:*'. Add Taskfile.yml for project build automation. Implement container self-network detection so spawned agents join the daemon's Docker network.
2026-07-24 13:32:50 +10:00
sam d80401d595 feat: add config overlay and shared RPC/Yaegi packages
- Introduce `-config-overlay` flag and `config.LoadOverlay()` to merge a base config with an overlay file, only overriding fields the overlay sets. This enables docker-compose to mount the base config from the host and apply only deployment-specific overrides.
- Create `internal/natsrpc` package with reusable NATS request/reply primitives (Envelope, Client, Call, RegisterAll, Respond). Migrate storerpc, worktreerpc, and forgerpc to use it, eliminating duplicated marshal/unmarshal and error handling.
- Create `internal/yaegiutil` package with shared interpreter construction (stdlib + extra symbols), generic export resolution (Resolve), and panic recovery (Safe). Migrate all Yaegi-based surfaces (gate scripts, daemon plugins, skill plugins, workflow stages, skill scripts) to use it, reducing boilerplate and centralizing panic safety.
- Simplify `config.docker.toml` to contain only overlay fields (paths, container config) and remove the duplicated repos list – the base config is now the single source of truth.
- Update docker-compose.yml to pass both -config and -config-overlay flags and mount the base config from the host.
- Add tests for LoadOverlay, DockerConfigOverlaysExampleConfig, Envelope, and yaegiutil utilities.
2026-07-24 12:57:10 +10:00
sam 4573ed125a chore: update issue tracking after batch of completed tasks 2026-07-24 12:56:44 +10:00
sam d3062cf8dd refactor: minimize config.docker.toml to Docker-specific overrides only 2026-07-24 12:34:01 +10:00
sam 8f8d0188b8 fix: host bind mounts for worktree to fix Docker container mount paths 2026-07-24 12:31:31 +10:00
sam c1f8760c5f chore: add collaboration/personas epics, close volume TTL issue 2026-07-24 12:27:09 +10:00
sam 242762b2fb refactor: archie:* → agent:* labels, remove stale archie label 2026-07-24 12:09:38 +10:00
sam b8ac644acd fix: sync docker config with inprocess — DeepSeek, 100M, diff cap 0 2026-07-24 11:44:04 +10:00
sam 920c56a14b fix: create branch on reuse if not found, add dolt+beads to Dockerfile 2026-07-24 11:31:27 +10:00
sam 1ce6489823 fix: bump branch slug limit to 60 chars 2026-07-24 11:22:34 +10:00
sam 006b4e8e54 feat: @mention detection, branch linking, stale worktree pull 2026-07-24 10:38:07 +10:00
sam e4368f70af feat: persistent volumes with TTL for container/worktree storage (archie-core-j7v)
Add [containers].volume_ttl (default 72h). Persistent-storage repos get a
per-repo bare Git cache (--reference-if-able --dissociate) so task
worktrees clone fast without repeated full network clones, while staying
fully independent of the cache's lifecycle — cache expiry can never
corrupt an active or parked task's worktree. Docker repo volumes are
labeled as Archie-owned and swept non-forced (a volume still attached to a
running container survives and retries next cycle); the repo cache
directory is swept by mtime. Both cleanups run at daemon startup and each
poll cycle.

Filed archie-core-756 (repo-wide golangci-lint baseline) and archie-core-340
(intermittent JetStream TempDir teardown flake) as separate follow-ups
rather than scope-creeping them into this change.
2026-07-24 10:22:11 +10:00
sam 827c108401 chore: supersede archie-core-358 with archie-core-5zh.8
archie-core-358 predates the whole-task-per-container model built in the
5zh epic. It envisioned a ContainerRunner implementing agentexec.Runner —
spawning a container per LLM stage call. The architecture that actually
landed spawns one container per task (daemon.process()'s ContainerPool)
and hands the entire workflow to archie-agent in one round trip; NATSRunner
already covers stage-level agentexec.Runner communication within that
model. A separate ContainerRunner would duplicate that boundary at the
wrong layer.
2026-07-24 09:31:39 +10:00
sam 75f237d1ad feat: daemon hands off tasks to archie-agent in sandboxed mode (archie-core-5zh.8)
daemon.process() branches on ContainerPool != nil: sandboxed tasks publish
a taskrun.Request to archie.taskrun.<id> and await the response via the
new runViaAgent method, instead of running workflow.Route/workflow.Run
locally. Non-container mode is unchanged. Every durable side effect
(Store, Forge, git push) already landed via the storerpc/forgerpc/
worktreerpc proxies during archie-agent's run by the time runViaAgent
returns — it only parks the task itself on transport/setup failure, never
duplicating a terminal state archie-agent's own workflow.Run already
recorded.

Also fixes a real correctness gap: with concurrent multi-task dispatch
(archie-core-u64/g1l) plus containerized archie-agent, a shared queue-group
subscription could let one container answer a sibling's taskrun message
while having a *different* task's worktree mounted. archie-agent now reads
its boot-time task.json and subscribes to its own exact per-task subject
when present, falling back to the shared queue group only in dev/pool mode
(no task.json).

Adds agentexec.ProvidersFromConfig, deduped from cmd/archied's former
executionProviders.

Closes the archie-core-5zh epic: archie-agent runs an entire task's
workflow per invocation instead of one stage per round trip, with all
credentials staying daemon-side throughout.
2026-07-24 09:14:56 +10:00
sam 1eee983681 feat: archie-agent runs a full task's workflow itself (archie-core-5zh.7)
Add internal/taskrun (Request/Response wire types) and
cmd/archie-agent/taskrun.go: runTask builds a workflow.Registry from the
container's own bind-mounted worktree, routes and runs the task's entire
workflow via workflow.Route/workflow.Run, using storerpc.Client/
forgerpc.Client for Store/Forge and a new hybridTrees that splits
Prepare/Push (proxied over worktreerpc — network ops needing the daemon's
credential) from CommitAll/Diff/ChangedFiles/ChangedLines (local git
against the mount).

Add config.TaskConfig.ToConfig() to rebuild a usable Config from the
curated payload, and storage.WorktreeMountDir (/data/worktree) — critical
fix: hybridTrees.Prepare discards the RPC response's host-side directory
and returns the container's fixed local mount path instead, since archied
and archie-agent see the same files at different paths.

Wired a queue-grouped core-NATS subscription on archie.taskrun.> in
cmd/archie-agent/main.go alongside the existing per-stage consumer, so
this is reachable in the running binary. End-to-end test drives the real
"bootstrap" workflow (no LLM) through real storerpc/forgerpc/worktreerpc
servers and a real local git remote — registry build, route, prepare,
commit, push, PR creation, and confirms the authoritative task state
lands in archied's store via RPC, not just in-memory.

archie-core-5zh.8 (daemon.go handoff) is unblocked.
2026-07-24 09:08:19 +10:00
sam 81ce920434 feat: register storerpc/forgerpc/worktreerpc servers in archied (archie-core-5zh.9)
Add registerTaskRPCServers() in cmd/archied/main.go: subscribes all three
RPC servers on the daemon's NATS connection whenever [nats] is configured,
using the same Store/Forge/worktree.Manager instances the daemon already
owns. archie-agent containers now have a live responder for the Store,
Forge, and worktree Prepare/Push calls proxied in archie-core-5zh.1-3.

Test spins an embedded NATS server and round-trips real storerpc/forgerpc/
worktreerpc clients against the registered handlers.
2026-07-24 08:59:04 +10:00
sam b544af6e92 refactor: trim TaskContext.Forge/Store/Trees to interfaces (archie-core-5zh.6)
Add Forger/TaskStore/Trees interfaces in internal/workflow/workflow.go,
scoped to exactly the methods stages call mid-run: 4 Forge methods
(Comment, CloseIssue, CreatePR, SetStateLabel), 2 Store methods (Update,
Transition), 6 Trees methods (Prepare, CommitAll, Push, Diff, ChangedFiles,
ChangedLines). This lets storerpc.Client/forgerpc.Client/worktreerpc.Client
satisfy TaskContext from inside archie-agent.

Go's structural typing meant zero other changes were needed — forge.Forge,
*store.Store, and *worktree.Manager already satisfy the trimmed interfaces.
No behavior change for the daemon's existing inprocess/subprocess paths.

Also fixes a gofmt nit left over from the 5zh.2 commit.
2026-07-24 08:56:23 +10:00