Connect processing to shared PromptKit backend capacity
This commit is contained in:
@@ -23,12 +23,12 @@ message and a typed cause; only exhausted structural repair is a malformed
|
||||
output failure. Secrets from all configured backends, including unselected
|
||||
ones, are available to the diagnostics redaction boundary.
|
||||
|
||||
## Current Orchestration
|
||||
## Orchestration
|
||||
|
||||
The old `llm.Scheduler` and runner instrumentation still exist pending the
|
||||
orchestration migration. The final runtime uses PromptKit backend admission,
|
||||
retry, and repair rather than that scheduler. `llm.DiagnosticsWriter` remains
|
||||
the current protected artifact writer.
|
||||
|
||||
Focused adapter tests use controlled local HTTP responses. Complete runner and
|
||||
CLI integration checks follow the caller and orchestration migration.
|
||||
CLI processing supplies two role clients from the same engine to the runner.
|
||||
PromptKit's per-backend admission applies to both roles and every generation,
|
||||
retry, and repair. The runner still processes module instances in order,
|
||||
collects concurrent section work deterministically, and cancels remaining
|
||||
section work on a runtime failure. `llm.DiagnosticsWriter` remains the protected
|
||||
request/response artifact writer. Execution observations and report summaries
|
||||
are completed by the following roadmap work.
|
||||
|
||||
@@ -38,10 +38,11 @@ Pipeline inputs are:
|
||||
|
||||
`runner.Run` returns:
|
||||
- final transcript;
|
||||
- per-module results;
|
||||
- utilization diagnostics.
|
||||
- per-module results.
|
||||
|
||||
CLI/reporting then map this into process report and diagnostics artifacts.
|
||||
CLI/reporting then map these results into process reports and diagnostics
|
||||
artifacts. PromptKit execution observations are collected at the role-client
|
||||
boundary for the new report summary.
|
||||
|
||||
## Failure Behavior
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ and [integration documentation](../integrations/subprocess.md) own external cont
|
||||
normalization, chunking, output, diagnostics, and reporting contracts. Domain
|
||||
behavior must not require CLI or provider-transport knowledge.
|
||||
- **Framework:** owns orchestration contracts and shared runtime mechanics for
|
||||
modules, validators, proposals, LLM adapters, scheduling, and report assembly.
|
||||
modules, validators, proposals, LLM adapters, and report assembly.
|
||||
It composes domain operations through explicit inputs and outputs.
|
||||
- **Modules:** own narrowly scoped correction behavior and module-specific prompt
|
||||
choices. Keep module packages separate rather than collapsing their distinct
|
||||
@@ -45,9 +45,10 @@ hidden global state.
|
||||
- Validate corrections before final mutation, including local proposal checks,
|
||||
decision cardinality, and apply-time safety. Provider-side schema enforcement
|
||||
does not replace these checks.
|
||||
- Keep concurrency bounded, configurable, context-aware, and observable through
|
||||
the existing scheduler and utilization diagnostics. Preserve permit release on
|
||||
success, failure, and cancellation.
|
||||
- Keep LLM concurrency bounded and context-aware through PromptKit's engine-local
|
||||
per-backend admission. Proposal and validation calls selecting the same backend
|
||||
share that capacity, including retries and repairs. Preserve deterministic
|
||||
collection order and cancellation of remaining work on runtime failure.
|
||||
- Keep module and validator identities, reason codes, and execution-class
|
||||
distinctions stable where exposed as contracts.
|
||||
|
||||
@@ -84,9 +85,10 @@ responsibilities and should remain separate. Implementation details belong in
|
||||
## Dependencies
|
||||
|
||||
Keep Audita dependency-light and prefer the Go standard library for CLI parsing,
|
||||
HTTP, JSON, filesystems, synchronization, and tests. Third-party dependencies
|
||||
should be narrow, justified, and preferably established for their purpose.
|
||||
YAML parsing is the existing direct dependency exception.
|
||||
filesystems, synchronization, and tests. ConfigKit owns configuration loading,
|
||||
presence, provenance, and secret resolution; PromptKit owns prompt/profile
|
||||
loading, OpenAI-compatible transport, retries, repairs, and backend admission.
|
||||
Audita owns domain meaning, role selection, and deterministic processing.
|
||||
|
||||
Do not introduce broad CLI, dependency-injection, workflow, logging, or plugin
|
||||
frameworks without a concrete implemented need and focused tests.
|
||||
|
||||
@@ -382,7 +382,20 @@ full runner behavior is Stage 8.
|
||||
|
||||
## Stage 8: Connect the Runner and Remove the Old Scheduling Hierarchy
|
||||
|
||||
**Status:** Pending. **Depends on:** Stages 2 and 4–7.
|
||||
**Status:** Complete (2026-09-24). CLI processing now supplies both role clients
|
||||
from one PromptKit engine; removed global/role schedulers, scheduler contracts,
|
||||
the old utilization instrumentation, and retired concurrency settings. Runner
|
||||
ordering, cancellation, partial failure handling, and domain checks remain.
|
||||
Updated architecture and runtime guidance. `go build -o /tmp/audita-stage8-build
|
||||
./cmd/audita` passed; focused diagnostics, module, proposal, validator, runner,
|
||||
and LLM suites passed; `go test -race ./internal/framework/llm` passed. Local
|
||||
HTTP tests covered shared backend capacity, independent backend identities,
|
||||
zero-wait rejection, queued deadline cancellation, and later capacity reuse.
|
||||
A real CLI-to-local-HTTP run completed with one proposal and two validation
|
||||
calls and wrote the corrected transcript. The legacy CLI test file still uses
|
||||
retired configuration and report contracts; assembled CLI tests remain for
|
||||
Stages 10–12. `git diff --check` passed.
|
||||
**Depends on:** Stages 2 and 4–7.
|
||||
**Owns:** CLI process assembly, `internal/framework/runner`, old scheduler contracts,
|
||||
and runner/CLI integration tests.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user