Commit Graph
1789 Commits
Author SHA1 Message Date
sam 2cb5ae3418 feat(access): archied access reset --org/--instance on the State Store host (archie-core-qc8p) 2026-09-26 15:23:32 +10:00
sam 020c6fb9d9 feat(access): the chain at the dashboard, API and dispatch; denial records and health surfacing (archie-core-qc8p) 2026-09-26 15:23:32 +10:00
sam 77a41ecfd9 feat(access): the chain at the dashboard, API and dispatch, with denial records and health reporting (archie-core-qc8p) 2026-09-26 15:23:32 +10:00
sam c41e2d76ad feat(access): policy, denial and principal persistence on the State Store contract (archie-core-qc8p) 2026-09-26 15:23:32 +10:00
sam c6d880a8f8 feat(access): cedar-go engine for the policy chain, shipped roles and cross-org forbid (archie-core-qc8p) 2026-09-26 15:22:01 +10:00
sam cd368851d1 feat(access): policy schema, actions, request assembly and Authorizer contract (archie-core-qc8p) 2026-09-26 15:22:01 +10:00
sam 8d7dae7d54 docs(claude): dev-docs pages are mandatory pre-reading, not colour, and carry into subagent prompts 2026-09-26 14:50:58 +10:00
sam bb6e8a648c docs(development): record today's two merge-surfaced bugs and the go-test-cache trap 2026-09-26 14:45:41 +10:00
sam be5174a660 docs(claude): sharpen the test-quality bar against config/DB fixtures and shipped test helpers 2026-09-26 14:40:10 +10:00
sam bcfe0f71c4 fix(workflow): sort the call-cycle walk's DFS roots for a deterministic report
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.
2026-09-26 14:05:39 +10:00
sam 5612b2c853 fix(agentworker): give the workflow-call test its own NATS server instead of the ambient default
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.
2026-09-26 13:56:16 +10:00
sam 4464cc41cc Merge crew/t2db-41: archie-core-t2db.41 2026-09-26 13:39:51 +10:00
sam beb54f7f6c fix(staterpc): drive the workflow-call conformance test's callee through running before completed 2026-09-26 13:39:25 +10:00
sam 93906f8fae style(workflow): adopt gate formatting simplification in the workflow.call tests 2026-09-26 13:36:41 +10:00
sam 70e436377c chore(docs): regenerate dev-docs index for workflow-calls 2026-09-26 13:36:41 +10:00
sam 5e8ab5cde9 docs(prds): de-date the org-enablement sentence in workflow-calls 2026-09-26 13:36:41 +10:00
sam f8c394dd80 test(agentworker): workflow.call callee start through the real State Store gRPC path (archie-core-t2db.41) 2026-09-26 13:36:41 +10:00
sam 08deeb57a7 docs(prds): record the workflow-caller pair and grant widening in the State Store contract (archie-core-t2db.41) 2026-09-26 13:36:41 +10:00
sam a3c0c76615 feat(store): workflow.call contract — callee enqueue, parent-scoped status read, task-scoped grant widening (archie-core-t2db.41) 2026-09-26 13:36:41 +10:00
sam 208a1a9c38 feat(workflow): workflow.call step with save-time input and cycle checks (archie-core-t2db.41) 2026-09-26 13:36:41 +10:00
sam 5c30e971f1 docs(prds): decisive design for workflow.call runtime and save-time checks (archie-core-t2db.41) 2026-09-26 13:36:40 +10:00
sam b7001ab898 Merge crew/qdbo-5: archie-core-qdbo.5 2026-09-26 13:35:04 +10:00
sam 49e61224a8 feat(controlplane): re-layer model, repository, scheduling and provider settings live on a watch (archie-core-zfb0.1)
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.
2026-09-26 13:28:01 +10:00
sam 71d98fe9b4 feat(statestore): enforce the execution transition table and map ErrIllegalTransition over the wire
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)
2026-09-26 13:13:20 +10:00
sam e7e3ea9d49 fix(postgres): renumber org migrations past 0012, already taken by installed-packages 2026-09-26 11:44:21 +10:00
sam ba23fab742 feat(org): carry task org across the State Store gRPC contract (archie-core-e5fn) 2026-09-26 11:43:10 +10:00
sam ee5339eb85 feat(org): idempotency key org/identity/owner/repo/number in one place, task uniqueness to match (archie-core-e5fn) 2026-09-26 11:43:10 +10:00
sam 16c52c1a16 feat(org): run the resumable default org upgrade before the State Store serves (archie-core-e5fn) 2026-09-26 11:43:10 +10:00
sam 4f5d135fe3 feat(org): Postgres tenant tables, org-aware store and resumable default upgrade (archie-core-e5fn) 2026-09-26 11:43:10 +10:00
sam 75f409141a feat(org): tenant boundary domain package — orgs, workspaces, memberships, agent assignments (archie-core-e5fn) 2026-09-26 11:43:10 +10:00
sam d8b8ba5de3 feat(storepkg): install digest-pinned packages 2026-09-26 10:48:23 +10:00
sam d61dff55bf chore(release): v1.42.0 2026-09-26 10:32:39 +10:00
sam 1c7dd08f43 feat(prreview): benchmark harness scoring findings on the Martian problems
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
2026-09-26 10:30:12 +10:00
sam 5c4e6351a0 feat(agentexec): output adapters for Codex, Pi, OMP and Copilot CLI 2026-09-26 10:28:40 +10:00
sam 70df8d1131 feat(daemon): run a Kit profile's task in its Kit container on the egress path 2026-09-26 10:14:33 +10:00
sam 25f2299225 feat(config): Kit profiles pin a workload Kit and mixins by digest 2026-09-26 09:21:57 +10:00
sam 1df6ecef32 feat(agentexec): run a Kit task's stages on its harness through a named output adapter 2026-09-26 09:20:30 +10:00
sam bc2ce7aca5 feat(storepkg): package descriptor with strict decoding and validation 2026-09-26 09:13:39 +10:00
sam 0eef8ed5ba fix(agentexec): count Claude cache tokens as prompt tokens, as the built-in loop does
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.
2026-09-26 09:11:57 +10:00
sam 4bbfd03c5c feat(agentexec): parse Claude Code's stream-json output for the harness 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.
2026-09-26 09:11:57 +10:00
sam 34460acac2 docs(architecture): state the shipped execution transition rules
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`.
2026-09-26 04:01:08 +10:00
sam 1024feda21 test(taskstate): seed fixture task states along the transition table
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.
2026-09-26 04:01:08 +10:00
sam 9a3f02a17a fix(daemon): keep a terminal worktree that holds uncommitted work
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.
2026-09-26 04:01:08 +10:00
sam 15efec696f fix(ui): count completed runs as delivered on the workflows surfaces
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.
2026-09-26 04:01:08 +10:00
sam d0fb41320c chore(ui): rebuild the dashboard for the completed count 2026-09-26 04:01:08 +10:00
sam 36b25f78cf feat(taskstate): count completed runs in the per-workflow stats
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.
2026-09-26 04:01:08 +10:00
sam ded863e0dc feat(taskstate): end no-change runs as completed and clean their worktrees 2026-09-26 04:01:08 +10:00
sam a48b31b572 feat(taskstate): transition tables for executions and steps 2026-09-26 04:01:08 +10:00
sam b1db80088f fix(archied): resolve stored provider credentials at boot 2026-09-26 03:50:07 +10:00
sam 3443e6b3de fix(controlplane): reject stored boot-derived provider keys 2026-09-26 03:44:40 +10:00