Commit Graph
5 Commits
Author SHA1 Message Date
sam a6ea539282 fix(kit): migrate runtime to sandbox kit m8 2026-10-09 18:31:56 +11:00
sam a45300d626 refactor: testing from the beginning. a journey in 150k lines of tests to none 2026-10-03 21:16:25 +10:00
sam 80f5f8ccc3 feat(kit)!: a Kit profile names one Kit image, a workload or a published set
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.
2026-09-28 02:04:04 +10:00
sam abb9f8a04e feat(harness): declare and enforce a workflow's harness needs at dispatch
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.
2026-09-27 05:25:39 +10:00
sam 788f0aaecc feat(kit): admit Kit v3 descriptors against archie's capability support
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.
2026-09-26 02:23:11 +10:00