Refine library upgrade guidance and record open decisions

This commit is contained in:
2026-11-23 02:24:51 +00:00
parent 187600eed2
commit e0471af25a

View File

@@ -182,6 +182,8 @@ them at `/promptkit`, using `SettingsInput` or equivalent explicit destinations.
Mount embedded fragments consistently. Discovery helpers return root-mounted Mount embedded fragments consistently. Discovery helpers return root-mounted
inputs; they do not perform this adaptation automatically. Imports and nested inputs; they do not perform this adaptation automatically. Imports and nested
destinations must be checked in the context of their containing fragment. destinations must be checked in the context of their containing fragment.
This is a native fragment-mounting capability, so retaining these inputs does
not require a compatibility parser or a parallel loading path.
Keep existing resource IDs, references, and application configuration version 3. Keep existing resource IDs, references, and application configuration version 3.
An optional `promptkit` section in the application main and its overlay can An optional `promptkit` section in the application main and its overlay can
@@ -213,12 +215,13 @@ repair budget. Runtime replacements replace the whole output contract. Passing
the schema inline keeps Audita's domain response contract independent of an the schema inline keeps Audita's domain response contract independent of an
operator's schema-root selection. Keep one embedded schema source of truth. operator's schema-root selection. Keep one embedded schema source of truth.
Preserve the current configurable structural budget, including explicit zero Preserve configurable structural budgets and explicit zero. Whether processing
and the default of two. The upstream default of one should apply only where retains Audita's current default of two or adopts PromptKit's default of one is
Audita leaves the budget unspecified, such as native requests using a prompt's [open decision 3](#3-structural-repair-default). Native requests using a prompt's
own output definition. Keep transient retries and semantic correction repair own output definition retain upstream budget resolution. Keep transient retries
distinct, with their existing operation deadlines and partial-success behavior. and semantic correction repair distinct, with their existing operation deadlines
Update ordinary and coordinated request construction together. and partial-success behavior. Update ordinary and coordinated request
construction together after selecting the processing default.
Link to the upstream schema reference for external prompt definitions and file Link to the upstream schema reference for external prompt definitions and file
resolution. Audita's documentation should identify its shipped schema selection resolution. Audita's documentation should identify its shipped schema selection
@@ -240,10 +243,12 @@ from known zero and an incomplete subtotal. PromptKit owns attempt aggregation,
reasoning-token interpretation, cache-hit ratios, cost sources, and terminal reasoning-token interpretation, cache-hit ratios, cost sources, and terminal
coverage. Costs are observations, not a billing guarantee or budget control. coverage. Costs are observations, not a billing guarantee or budget control.
Carry `MessageContentHash` into existing prepared debug metadata where useful, Carry `MessageContentHash` into prepared debug metadata where useful, and retain
and extend debug execution projections to retain reasoning tokens, native cost reasoning tokens, native cost facts, and cache-hit information in optional debug
facts, and cache-hit information. Preserve their availability/completeness evidence. Whether to use native facts within an Audita envelope or extend local
semantics in both per-call and aggregate paths. Avoid recomputing upstream projections is [open decision 1](#1-debug-execution-data-and-format-compatibility).
Preserve their availability/completeness semantics in both per-call and
aggregate paths. Avoid recomputing upstream
metrics or summing overlapping attempt, terminal, and group totals. These facts metrics or summing overlapping attempt, terminal, and group totals. These facts
belong in optional diagnostics; ordinary errors/recoveries documents continue belong in optional diagnostics; ordinary errors/recoveries documents continue
to describe processing outcomes. to describe processing outcomes.
@@ -295,13 +300,18 @@ fits and link upstream for its behavior. Planning documents may identify APIs
and migration constraints needed to explain the proposed work; those details and migration constraints needed to explain the proposed work; those details
should not grow into a parallel library reference in the published documentation. should not grow into a parallel library reference in the published documentation.
Keep ordinary Audita workflows discoverable. Brief application examples may
demonstrate standard flags such as `--show-tokens` or an inspection command,
with a link to upstream for the detailed contract. These examples explain how
to operate Audita; they need not reproduce a library command or field reference.
Align the documentation during this upgrade, including existing duplication: Align the documentation during this upgrade, including existing duplication:
| Affected material | Required alignment | | Affected material | Required alignment |
| --- | --- | | --- | --- |
| [Documentation policy](../policy/documentation.md#upstream-dependencies) | Completed: adopted upstream v1.13's dependency-documentation rule from revision `5b9088601290564647a9e20c13f95c0da9f4cb15`. Apply it to the remaining documentation work below. | | [Documentation policy](../policy/documentation.md#upstream-dependencies) | Completed: adopted upstream v1.13's dependency-documentation rule from revision `5b9088601290564647a9e20c13f95c0da9f4cb15`. Apply it to the remaining documentation work below. |
| [Configuration](../config.md) | Retain Audita's schema, source selection, companion mounts, role settings, and overrides. Link to ConfigKit for composition and secrets controls, and to PromptKit for its settings and resource formats; avoid reproducing their field/default references. | | [Configuration](../config.md) | Retain Audita's schema, source selection, companion mounts, role settings, and overrides. Link to ConfigKit for composition and secrets controls, and to PromptKit for its settings and resource formats; avoid reproducing their field/default references. |
| [CLI](../cli.md) | Identify the installed CommandKit integrations and link to the upstream command reference. Describe Audita's `process` command and application-specific stream/exit mapping locally. Introduce native usage reporting by availability and an upstream link, without a local reference for its flags, report layout, or formatting rules. | | [CLI](../cli.md) | Identify the installed CommandKit integrations and link to the upstream command reference. Describe Audita's `process` command and application-specific stream/exit mapping locally. Introduce native usage reporting with a brief workflow example and an upstream link; leave the detailed flag, report layout, and formatting reference upstream. |
| [LLM integration](../integrations/openai-compatible-llm.md) | Reduce the document to Audita's adapter boundary, role/schema/budget choices, and mapping of model failures into processing outcomes. Link upstream for transport, provider conventions, credentials, retry/repair mechanics, admission, and token/cost semantics. | | [LLM integration](../integrations/openai-compatible-llm.md) | Reduce the document to Audita's adapter boundary, role/schema/budget choices, and mapping of model failures into processing outcomes. Link upstream for transport, provider conventions, credentials, retry/repair mechanics, admission, and token/cost semantics. |
| [Operations](../operations.md) and [subprocess integration](../integrations/subprocess.md) | Describe when Audita invokes secrets bootstrap and how startup failure affects processing/output preparation. Link to ConfigKit for bootstrap behavior and to CommandKit for native diagnostic reporting; retain Audita-owned output lifecycle and subprocess handling. | | [Operations](../operations.md) and [subprocess integration](../integrations/subprocess.md) | Describe when Audita invokes secrets bootstrap and how startup failure affects processing/output preparation. Link to ConfigKit for bootstrap behavior and to CommandKit for native diagnostic reporting; retain Audita-owned output lifecycle and subprocess handling. |
| [LLM runtime](../internal/llm-runtime.md), [prompt registry](../internal/prompts.md), [diagnostics internals](../internal/diagnostics-reporting.md), and [CLI/configuration recipes](../internal/cli-config.md) | Retain Audita's component wiring, call sites, domain attribution, and change recipes. Replace standalone explanations of upstream loading, coordination, observation, schema resolution, and metrics with focused upstream links. | | [LLM runtime](../internal/llm-runtime.md), [prompt registry](../internal/prompts.md), [diagnostics internals](../internal/diagnostics-reporting.md), and [CLI/configuration recipes](../internal/cli-config.md) | Retain Audita's component wiring, call sites, domain attribution, and change recipes. Replace standalone explanations of upstream loading, coordination, observation, schema resolution, and metrics with focused upstream links. |
@@ -331,14 +341,21 @@ The implementation should cover the following outcomes:
- Select all five target versions in `go.mod` and tidy module metadata. Adapt - Select all five target versions in `go.mod` and tidy module metadata. Adapt
changed public types, including affected tests and any positional literals. changed public types, including affected tests and any positional literals.
- Replace separate PromptKit source assembly with the shared typed load and - Replace separate PromptKit source assembly with the shared typed load and
native inputs; keep error classification, source evidence, relative resources, native inputs; keep source evidence, relative resources, selected overlays,
selected overlays, and output protection coherent across both consumers. and output protection coherent across both consumers. Apply the error
classification selected in [open decision 2](#2-runtime-classification-of-bundled-asset-failures).
- Bootstrap configured secrets through the upstream helper before loading, - Bootstrap configured secrets through the upstream helper before loading,
reuse its prepared main, and retain its safe report and native failure facts. reuse its prepared main, and retain its safe report and native failure facts.
- Adapt embedded-schema installation and explicit request contracts, preserving - Adapt embedded-schema installation and explicit request contracts, preserving
canonical domain schemas and existing configured budgets. canonical domain schemas and existing configured budgets.
- Adopt native usage reporting and retain useful new metadata in optional debug - Adopt native usage reporting and retain useful new metadata in optional debug
evidence. Preserve cancellation causes, recoverable timeouts, and joined work. evidence. Preserve cancellation causes, recoverable timeouts, and joined work.
- Remove superseded source assembly, filesystem-context reconstruction, YAML
encode/decode round trips, and redundant accounting projections as their
replacements land, subject to the debug-data decision. Remove or consolidate
tests that only protect those retired mechanisms; retain behavioral coverage
for the application contracts they served. Cleanup is a completion outcome of
this upgrade.
- Update canonical configuration, CLI, operations, LLM integration, and internal - Update canonical configuration, CLI, operations, LLM integration, and internal
documentation plus maintained examples under the ownership and consolidation documentation plus maintained examples under the ownership and consolidation
direction above. Replace duplicated library guidance with canonical upstream direction above. Replace duplicated library guidance with canonical upstream
@@ -349,16 +366,19 @@ The implementation should cover the following outcomes:
selected releases, and all five remain `LGPL-3.0-or-later`. Reuse applicable selected releases, and all five remain `LGPL-3.0-or-later`. Reuse applicable
local standard texts; inspect any newly selected transitive material. local standard texts; inspect any newly selected transitive material.
Use focused offline tests for the consequential integration risks: main/import/ Use focused offline tests at Audita's integration boundaries: representative
companion/overlay precedence and source-relative message resolution; configured source selection and mounting with relative resources; shared configuration
secrets bootstrap, prepared-source reuse, existing and empty environment values, handoff; secrets bootstrap with prepared-source reuse and startup failure
explicit overwrite, and startup failure reporting; retained reporting; canonical schema and configured repair-budget handoff; inspection
schema validation and explicit zero/nonzero repairs; native inspection paths scopes and comparison acquisitions; context propagation and failure
and independent comparison acquisitions; timeout/cancellation classification; classification; and domain attribution across proposal, validation, and repair.
and token/cost reporting across proposal, validation, and repair calls. Check Check transcript/diagnostic stream separation, quiet/help behavior, and
stdout isolation, quiet/help behavior, unknown versus zero usage/cost, and
coexistence with debug capture using controlled clients or HTTP responses. coexistence with debug capture using controlled clients or HTTP responses.
Keep the existing partial-success and output-lifecycle coverage. Where Audita transforms usage or cost evidence, verify that it preserves native
availability and completeness. Keep the existing partial-success and
output-lifecycle coverage. Select representative cases that detect Audita wiring
errors without rebuilding ConfigKit's environment/overwrite matrix or
PromptKit's accounting and provider-decoding suites.
Run the complete offline suite and required Linux builds after implementation. Run the complete offline suite and required Linux builds after implementation.
Do not duplicate upstream's provider-decoding or lifecycle test inventories. Do not duplicate upstream's provider-decoding or lifecycle test inventories.
@@ -373,11 +393,77 @@ semantic repair policy, pricing estimates, spending limits, or a redesign of
ordinary processing reports. ConfigKit secrets bootstrap is included in the ordinary processing reports. ConfigKit secrets bootstrap is included in the
adoption; additional custom inspection scopes remain an optional future choice. adoption; additional custom inspection scopes remain an optional future choice.
The recommended fragment mounting should preserve existing valid Audita inputs; Compatibility is a consideration, not an absolute constraint on the target
do not presume that an upstream pre-v1 breaking release forces an Audita major design. Retain wrapperless companion inputs through native mounting, but avoid
release. Confirm compatibility against the documented Audita contracts and compatibility branches whose only purpose is preserving incidental inspection
formatting, debug representations, or old loading mechanisms. Debug format and
failure-classification changes remain subject to the open decisions below.
Choose the desired application contract first, then assess migration and release
impact; a smaller release number is not a reason to retain avoidable complexity.
Native fragment mounting should preserve existing valid Audita inputs. An
upstream pre-v1 breaking release does not itself force an Audita major release.
Confirm compatibility against the documented Audita contracts and
representative existing projects before choosing the release version. If the representative existing projects before choosing the release version. If the
implementation intentionally requires configuration conversion or breaks an implementation intentionally requires configuration conversion or breaks an
Audita integration contract, document it and select a major release under the Audita integration contract, document it and select a major release under the
[release policy](../policy/release.md#versioning-and-compatibility). A compatible [release policy](../policy/release.md#versioning-and-compatibility). A compatible
adoption with the added CLI capability is suitable for a minor release. adoption with the added CLI capability is suitable for a minor release.
## Open Decisions
The following recommendations remain pending discussion; they are not approved
implementation choices.
### 1. Debug execution data and format compatibility
Should optional debug artifacts retain Audita's existing usage projections or
carry native PromptKit execution facts within an Audita-owned envelope?
**Recommendation:** Keep Audita's stage, role, logical-call, and correction
attribution in the envelope, and use native execution facts wherever practical.
Concentrate any necessary serialization adaptation at one boundary. This reduces
duplicated metric structures and repeated changes when PromptKit adds evidence.
Accept a deliberate debug-format change if it materially simplifies the result;
assess affected consumers and document the migration before implementation.
**Alternative:** Extend the existing projections and preserve their field layout.
This minimizes disruption to diagnostic consumers and insulates them from native
type changes. It also leaves Audita maintaining parallel representations and
mapping new upstream fields. Determine whether actual compatibility needs justify
that continuing cost.
### 2. Runtime classification of bundled asset failures
Should Audita retain the embedded-only engine construction used by
`embeddedAssetOrInputError` after the requested engine fails?
**Recommendation:** Verify shipped assets through focused tests and use the
original shared load's diagnostics at runtime. Retain the distinction between
bundled defects and operator-input failures if upstream diagnostics expose it
directly. Otherwise, consider simplifying that distinction rather than building
a second engine solely to classify the first failure. Review the resulting CLI
and subprocess error mapping explicitly before changing it.
**Alternative:** Retain the diagnostic construction and shipped-prompt inspection.
It preserves the existing runtime distinction when the original error cannot
identify responsibility. It also duplicates configuration/engine assembly on the
failure path and must evolve alongside the primary loader. Decide whether the
operational value of that classification warrants the extra mechanism.
### 3. Structural-repair default
Should processing retain Audita's default of two structural repairs or adopt
PromptKit's default of one?
**Recommendation:** Adopt the native default unless Audita workload experience
provides a reason for two. This reduces an application-specific policy difference;
the existing value alone is not a reason to preserve it. Select the simplest
budget handoff consistent with the chosen default and recorded configuration.
This is a behavior decision requiring discussion, not a mechanical API migration.
**Alternative:** Retain two as an explicit Audita default if representative
workloads benefit from the additional structural-repair opportunity. That may
improve successful completion, but can add latency and provider work and keeps
the default distinct from native requests. Preserve explicit zero, operator
overrides, and the separate semantic correction-repair budget under either choice.