Repository navigation
Description
Objective and readiness
Implement ADR 0004, Gate 4: generated lifecycle consumers, run-scoped overlays, and actual-harness eligibility. Parent: #10290.
2026-10-21 user-directed scope correction: retain model-management functionality only. Harness eligibility means detecting/comparing the selected harness version through existing execution backends and applying model constraints. It does not mean proving an adversarial process cannot modify its runtime. Remove the unmerged Yama/kernel builder, native hardening addon, new cgroup/pidfd/controller authentication, protected spawn/launch-attestation, private execution-plan transport, and complete Node/SDK closure work and their dedicated tests/CI/docs. Preserve existing security controls. Unknown/missing actual-runtime version evidence fails an applicable constraint explicitly; do not invent a new isolation architecture to eliminate that unknown.
Phase 3 is no longer a blocker. The foundation PRs are merged:
- test: Characterize model metadata behavior and drift #10301 completed Phase 1 (ADR 0004 phase 1: characterize model metadata behavior and drift #10291): legacy behavior characterization.
- Define versioned model contracts and provider-qualified identity #10310 completed Phase 2's local schema/identity foundation (ADR 0004 phase 2: define canonical schemas and provider-qualified identity #10292): shared contracts, configured-catalogue compatibility, and the ADR compatibility matrix.
- Compile reviewed model records into deterministic compatibility projections #10317 completed Phase 3 (ADR 0004 phase 3: compile maintained model records into deterministic projections #10293): maintained sources, governed imports, deterministic compatibility projections, and separately staged target corrections.
- Migrate lifecycle readers to generated data (ADR 0004 phase 4, partial) #10360 merged the first, compatibility-reader-only slice of Phase 4, including review fixes in commit
1128e2a0. It does not complete this phase.
Generated lifecycle/naming and shared eligibility/re-evaluation are delivered (#10360/#10681/#10878). Cloud Hypervisor observations are merged (#11057/#11064). Docker/ARC-DinD producer implementation is merged in #11072. Remaining work includes live runtime acceptance, NVX producer/enforcement, attribution gaps and compiler/overlay wiring. Current NVX work is tests-only with invocation unchanged. Workflow/config wiring and phase completion remain blocked on agreement with github/gh-aw. Companion tracking now exists at github/gh-aw#70728; it records the proposed contract and remaining decisions, not completed agreement or implementation. Do not treat the local Phase 2 issue's closure or the companion issue's creation as cross-repository agreement, or invent final frontmatter/config field names independently. Companion compiler support and compiler-to-AWF round-trip coverage are required for completion, not optional follow-ups.
This phase may run alongside the remaining Phase 5 work against the merged contracts. Phase 8 maintenance/publication is delivered and should be reused. Read the current ADR's Gate 1 handoff, Phase 2 compatibility matrix and cross-repository blocker, and Phase 3 source/projection ownership before implementation. Keep PRs bounded; a partial lifecycle PR must not close the entire phase.
Merged partial progress and remaining work (2026-11-04 UTC)
- Migrate lifecycle readers to generated data (ADR 0004 phase 4, partial) #10360 delivered generated host lifecycle/suggestions and proxy retirement readers with compatibility and packaging coverage.
- Unify model resolution around canonical provider-qualified identities #10681 completed naming slice Unify model-name resolution with canonical provider-qualified catalogue identities #10670: canonical provider-qualified identities/match provenance, bundled naming views, request rewriting, exact/scoped alias/family matching and consistent policy/retirement/selector/routing/fallback/pricing integration. Exact available IDs retain precedence over routing aliases; parameters and explicit matching policies are preserved. Ambiguous aliases, retired descendants, specialized family capture and prefix handling have named corrections and regressions.
- fix: recover retired and unavailable models with compatible choices #10763 subsequently introduced bounded same-backend compatible HTTP recovery for retired/unavailable IDs, including authoritative Copilot discovery and model-specific upstream rejection. It preserves features/effort/known limits and policy/budget checks, respects opt-outs and does not rewrite opaque WebSocket sessions. This is an intentional behavior change, not proof of actual-environment harness eligibility.
- fix: warn instead of rejecting models without pricing #10757 permits unpriced usage with warnings and possible budget undercount; pricing coverage must not be reintroduced as an implicit availability filter.
- These three PRs are included in released v0.29.1. The earlier main loader smoke does not establish a fresh live test of their combined behavior.
Delivered since the prior reconciliation: #10878 completed #10877's shared scoped decision/re-evaluation API and real consumers, including comparison, structured-reason, immutable refresh and packaging tests. Do not reimplement that layer.
User-confirmed supported targets: cloud-hypervisor, nvx, docker, and arc/dind only. ARC/DinD is a Docker deployment topology, not a separate runtime backend. sbx is unsupported; historical enum/backend names (including runc/gVisor/Kata) are not additional product support targets. Do not count sbx coverage toward phase completion or plan new sbx work.
#11057 added the bounded actual-environment observation contract, primary host/proxy wiring and Cloud Hypervisor producer; #11064 corrected its mistaken sbx scope and removed only the sbx-specific additions. The initial supported producer was Cloud Hypervisor primary guest; #11072 subsequently delivered Docker/ARC-DinD pre-command observation. Cloud Hypervisor continues using its ready execution channel with the command's guest UID/GID, environment, cwd and login shell. Direct Copilot/Claude/Codex selection is observed through bounded --version execution (10 seconds, 4096-byte stdout); wrappers/opaque commands and missing/failed/malformed/mismatched evidence remain explicitly unverified.
Observations are atomically published through the existing primary proxy log mount and captured alongside immutable eligibility pins; in-flight state is not mutated. Dedicated enclave proxies do not inherit primary-agent evidence. Docker/ARC-DinD now have a pre-command observation gate in merged #11072. NVX still reports runtime_probe_unsupported; #11092 now tracks tests through its existing invocation, not producer implementation. No host-installed version substitutes for a guest/container version.
Validation/release boundary: observation invocation, limits, failure classification, pinning and packaging have deterministic/local executable fixture coverage, not live KVM/Docker/NVX/ARC-DinD deployment proof. #11057/#11064 are merged on main but not in the latest release checked here, v0.29.6. #10878's decision layer is released (included in v0.29.5). Bundled harness constraints remain empty, and feed constraints remain rejected as catalogue_harness_unsupported; observation support does not authorize feed activation, immutable-executable attestation or per-subprocess/session verification.
Remaining: live validation of delivered producers; NVX production observation/enforcement (not authorized by the current tests-only slice); enclave/opaque/session attribution and complete supported-path enforcement; workflow/operator run-local overlays/conflicts/provenance and compiler versioning/round trips. github/gh-aw#70728 remains open. This phase stays open.
The former compatibility-reader-only baseline is superseded by these merged slices, not by unmerged worktree implementations. Source maintenance/publication/loader integration is now delivered under #10298/#10295; do not rebuild it here. Naming remains bundled, and publication v1 does not distribute aliases, availability or routing rules. A canonical identity or tariff alone does not establish deployability.
#10029/#10030 remain open. Recheck current reviewed sources and named target fixtures before any additional lifecycle activation; a price, import entry or successful capture is not CLI availability evidence. No assertion here promotes all staged corrections.
Current runtime validation priority (2026-11-04 UTC)
User-directed order: Cloud Hypervisor and NVX first; Docker/ARC-DinD live acceptance last.
- Validate selected-harness observations in live Cloud Hypervisor guests #11091: validate the existing Cloud Hypervisor primary-guest producer using provider-free fixtures and real supported KVM execution. Deterministic coverage does not establish live acceptance.
- Validate current NVX harness execution without changing invocation #11092 / open PR test: exercise NVX harnesses through existing execute interface #11095: test NVX through its existing execute/output interfaces. The latest user instruction is to leave NVX invocation and lifecycle unchanged. No private control channel, production wrapper or observation producer is authorized by this tests-only slice.
- Observe selected harness versions before Docker/ARC-DinD agent commands #11068: Docker/ARC-DinD implementation is merged in feat: observe harness versions before Docker agent commands #11072; provider-free test infrastructure is merged in test: add provider-free live Docker harness observation jobs #11075. Its remaining live acceptance is deferred until the Cloud Hypervisor/NVX work. Neither a test workflow's existence nor an unrelated Docker job establishes actual Kubernetes ARC acceptance.
NVX's production observation/admission gap remains Phase 4 work; tests of current execution behavior must not be counted as a delivered producer. Record exact revisions/environments for real runs and keep skipped jobs, portable fixtures and unavailable infrastructure distinct. Feed constraints remain disabled, and broader phases stay open.
Completed slice and next bounded work
- ADR 0004 phase 4 slice: shared scoped eligibility decisions and refresh re-evaluation #10877 — shared scoped eligibility decisions and request-pinned refresh re-evaluation. Completed by [WIP] Implement shared scoped eligibility decisions and refresh re-evaluation #10878; native child remains closed.
- Cloud Hypervisor primary-guest observation and host/proxy wiring, feat: observe actual-environment harness versions #11057 plus runtime-support correction fix: correct harness observation runtime support boundary #11064. Shared contracts and existing Cloud Hypervisor execution semantics are retained; unsupported sbx additions are removed.
- Docker/ARC-DinD pre-command producer implementation merged in feat: observe harness versions before Docker agent commands #11072. Observe selected harness versions before Docker/ARC-DinD agent commands #11068 remains open for deferred live acceptance.
- First: Cloud Hypervisor live validation Validate selected-harness observations in live Cloud Hypervisor guests #11091 and NVX as-is tests Validate current NVX harness execution without changing invocation #11092. Keep NVX invocation/lifecycle unchanged and distinguish existing execution tests from the missing production observation producer.
- Per-invocation enclave/opaque-session observation and any remaining enforcement/attribution gaps; document unsupported evidence explicitly.
- Compiler/overlay round trips remain separate under github/gh-aw#70728.
Native children #11091 and #11092 track current Cloud Hypervisor/NVX testing. #11068 retains Docker/ARC-DinD live acceptance, now last. Completed #10877 stays closed; none of these partial slices closes this phase.
Reuse the merged foundation
shared/model-information/schema.v1.json: canonicalmodel, scopedoverlay, availability, provenance, and harness contracts. Harness constraints already carryscope,name,scheme,minimum, optionalexcludedRanges,reason, and provenance.shared/model-information/identity.jsand.d.ts:identity,normalizeId,matchModel, andmatchFamilyRule. Provider identity/raw IDs survive normalization; prefix/date/separator handling is explicit policy, not a universal rewrite. Identity matching alone does not establish availability, policy permission, or harness eligibility.shared/model-information/contracts.jsand.d.ts:validateandvalidateRecords; reuse schema and complete-set checks rather than creating parallel validators or tables.shared/model-information/sources/andcatalog.generated.json: maintained facts and the baseline static catalogue. Imported entries and schema-required lifecycle placeholders are not evidence of CLI availability or verified harness support.src/model-information.compat.generated.json: active legacy-compatible hostsupported,retired, andsuggestionOrderprojection, consumed bysrc/copilot-model.ts.containers/api-proxy/model-information.retired.generated.json: active legacy-compatible proxy retirement projection, consumed by the guard and copied by the proxy Dockerfile.shared/model-information/sources/lifecycle-compatibility.json: legacy suggestion ordering only, validated as a permutation of canonical supported CLI IDs plusauto; it cannot author availability.shared/model-information/target.generated.jsonandbaseline-to-target.generated.json: staged Add curated AI-credit prices for current Copilot models #10029/Complete routing effort metadata for current OpenAI and Anthropic models #10030 corrections and complete before/after review data, not automatically active inputs.
Use npm run models:generate after canonical source/compiler changes and npm run models:check to verify generated bytes. Do not hand-edit projections or add an independent allowlist/retirement authoring path. The scheduled source-aware updater from #10439/#10466 owns evidence-backed source/import proposals and regeneration; it does not independently author generated outputs.
Deliverables
1. Migrate lifecycle consumers with explicit compatibility boundaries
The reader/data-ownership portion landed in #10360 and shared naming integration in #10681; do not reimplement either. Build on their generated readers and shared resolution contract to wire provider/channel/deployment-scoped eligibility without treating Copilot CLI support as native-API or Copilot-API support. Family rules, imported tariffs and endpoint mappings cannot establish deployability.
Preserve the explicit host/proxy matching policies established by #10681 and their characterization fixtures. Host CLI separator equivalence is a compatibility policy, not proxy-wide separator folding or date stripping. Redundant-current-provider prefixes and native wire IDs must not be stripped twice. Additional lifecycle acceptance changes need named evidence and reviewed regressions; shared identity alone must not broaden availability.
Preserve host result/error contracts, replacement suggestions, and suggestion behavior. The generated host list is sorted differently from the legacy insertion order: investigate equal-distance suggestion tie behavior rather than assuming set equality proves parity. auto remains a selector, not a deployable model; validate the eligible candidates it can select.
Reuse the shared eligibility decision contract integrated by #10878 for explicit requests, selectors, routing, fallback and recovery. Keep its structured rejection reasons and sanitized provenance available for subsequent phases; do not introduce a second resolver. Remove superseded local lifecycle table ownership/comments as each consumer migrates, but retain compatibility adapters and valuable characterization fixtures; broad legacy cleanup remains Phase 9.
2. Activate only reviewed lifecycle corrections
Phase 3 originally staged six #10029 CLI additions; reconcile current source/activation evidence before implementing any still-missing additions: claude-opus-5.5, claude-sonnet-5.5, gemini-3.8-flash, grok-4.5, grok-4.6, and grok-4.7. Review their exact source evidence and eligibility scope before activation; current target provenance cites issue evidence with estimated confidence.
Separate a compatibility-only reader migration from intentional activation of these additions. If activated here, update canonical inputs/compiler projections and named expectations together, documenting the exact behavior change. Preserve price, effort, context, and protocol behavior: loading the entire target export or target mapping merely to enable availability would prematurely activate Phases 5/6.
Do not close #10029 based on availability alone; Phase 5 still owns its pricing requirements. #10030's reasoning/context activation belongs to Phase 6. Do not invent harness minimums or other missing facts to complete records.
3. Agree and wire the workflow/config contract
Before wiring workflow-defined entries, agree the exact frontmatter and AWF config keys, payload version/supported range, scope, and error behavior with github/gh-aw; link the companion issue/PR and agreement in the handoff.
The companion is github/gh-aw#70728. The implementation direction is model-information frontmatter -> AWF modelInformation; reconcile the model-only payload after removing execution-plan/attestation metadata. Retain the existing 21,000-byte final expression-bearing rendered-script limit, counting escaping and command overhead, with an actionable oversize error; larger-snapshot staging is excluded. Go/WASM and JS model validation must agree. Prove the supporting version's model-config capability, not a new immutable runtime closure. Where routing/startup ordering prevents an ordinary actual-environment probe, resolve the ordering within existing backend behavior or report an unsupported/unknown check explicitly; host versions must not masquerade as guest versions.
The agreed payload must cover existing canonical overlay records, sanitized original-source workflow provenance, inline snapshot/source enabled/offline settings, and model-relevant harness selection semantics. Compiler-owned metadata must not include raw private argv, prompts, or credentials; no new protected execution-plan channel is required. Initial active live-URL mode rejects actionably. Phase 4 owns model config transport/validation; Phase 5 owns fetching, cache, freshness, and pricing resolution. Source replacement must not imply fallback to an unconfigured default; offline/local-only settings must retain their no-feed-network contract. Imported and secondary-engine declarations must retain scope and reach their actual consumer; silently dropping them is not acceptable.
Both compiler and AWF validate the same versioned payload. Unsupported versions, including use with older pinned AWF, fail actionably rather than silently dropping fields. Cross-contribution workflow/operator assignments to the same semantic field reject when provider/channel match and deployment scopes intersect, even for identical values; there is no implicit specificity/import-order override. Operator lifecycle status, including active, counts as an assignment, so authors must consolidate overlapping model contributions. Preserve legitimate scoped facts within a consolidated record. Provider/channel are exact boundaries; deployment-specific overlays cannot introduce broader unscoped facts.
Keep overlays run-local; never mutate bundled records or shared caches. Retain existing open, unversioned apiProxy.providers and configured pricing-catalogue v1 behavior. Strict unknown-field rejection applies to new explicitly versioned formats, not retroactively to legacy inputs. Existing workflows with no new payload remain unchanged. Config schema edits must use the repository's canonical schema-generation mechanism.
4. Enforce actual-execution-environment harness eligibility
Reuse #11057/#11064's Cloud Hypervisor actual-environment producer and primary proxy observation/pinning boundary. Reuse merged #11072's Docker/ARC-DinD producer rather than implementing it again. Live acceptance remains separate. NVX producer integration is still a phase gap; current #11092 explicitly tests NVX as-is and does not authorize changing its invocation or adding a guest control channel. Product support is not observation capability. Enclaves must not inherit primary-agent evidence, and wrappers/opaque sessions remain unverified unless separately observed.
Reuse #10878's tested semver and numeric-components comparison/constraint semantics, including prerelease ordering and excluded ranges. Unknown, unavailable, or unparsable detected versions cannot satisfy an applicable requirement. Distinguish absent/unverified model constraints from a known satisfied minimum; do not fabricate floors or claim verified compatibility from missing metadata.
Explicit harness-incompatible requests fail with required/detected versions, scope, reason and upgrade guidance; missing evidence cannot satisfy an applicable constraint. Automatic candidates must pass the same harness checks. Do not silently upgrade the harness or treat #10763's documented retired/unavailable-model recovery as proof of harness compatibility. Preserve that bounded HTTP recovery and its opt-outs rather than reinstating the superseded blanket ban on all name substitutions. Overlays cannot bypass network, model-policy, picker or harness checks.
The request-pinned re-evaluation interface and reusable decision/reasons are delivered by #10878, with observation-report pinning added by #11057/#11064. Phase 5/6 must reuse them. Full activation of feed-supplied harness constraints remains disabled until a separately reviewed complete producer/consumer enforcement boundary; the current loader rejects catalogue_harness_unsupported. Do not equate available APIs with all-backend enforcement.
Entry points and packaging
Discovery entry points, not mandatory module boundaries:
src/copilot-model.ts,src/cli-workflow.ts, AWF config readers/schema, and selected runtime backends/probes.containers/api-proxy/{guards/retired-model-guard.js,guards/model-policy-guard.js,model-resolver.js,model-fallback-chain.js,scoped-auto-model.js}and routing candidate construction.- The shared contracts, canonical sources, generated lifecycle assets, and compiler listed above.
Shared repository modules are not automatically present inside the proxy's /app build context. Generated JSON interchange is already established; ensure any runtime shared logic/data works in actual host build/package and proxy/container contexts, not only via repository-relative imports. Add only focused, compatible contract/compiler refinements required by this integration, with corresponding fixtures and documentation.
Acceptance criteria
- Host validation/suggestions and proxy retirement/replacements consume canonical-generated/shared data, not independently maintained lifecycle lists; source regeneration and stale-output checks cover every changed projection. Landed in Migrate lifecycle readers to generated data (ADR 0004 phase 4, partial) #10360.
- Canonical provider-qualified naming, explicit matching policies, scoped aliases/family exceptions and downstream identity interpretation are integrated, with characterized compatibility and named corrections. Unify model resolution around canonical provider-qualified identities #10681; Unify model-name resolution with canonical provider-qualified catalogue identities #10670 is closed.
- Shared provider/channel/deployment eligibility decisions, structured reasons and actual explicit/selector/routing/fallback/recovery integration are delivered in [WIP] Implement shared scoped eligibility decisions and refresh re-evaluation #10878; ADR 0004 phase 4 slice: shared scoped eligibility decisions and refresh re-evaluation #10877 is complete.
- Run-local overlays and actual-harness producer/enforcement coverage are complete across supported targets and relevant contexts. Cloud Hypervisor and Docker/ARC-DinD producer implementations are merged; live acceptance and NVX producer coverage remain.
- Any Add curated AI-credit prices for current Copilot models #10029 lifecycle additions have verified evidence, explicit activation boundaries, and named regression expectations; no staged pricing/reasoning/context/translation changes are activated incidentally.
- Linked
github/gh-awagreement and companion implementation define the same opt-in versioned payload. End-to-end workflow-frontmatter -> compiler -> AWF config tests cover custom entries, scope, strict validation, schema-version mismatch, and older-pinned-AWF failure; existing workflows remain unchanged. - Intersecting cross-contribution assignments fail even when identical, including operator lifecycle status; consolidated records retain their valid scoped facts. Overlays remain run-local and do not modify shared cache or bundled records. Legacy provider overlays and configured-catalogue v1 inputs retain their existing acceptance/authority.
- Overrides cannot bypass network, model-policy, picker, or harness checks; sanitized workflow provenance and structured eligibility reasons survive resolution without leaking secrets or arbitrary prompt text.
- Shared constraint comparison, boundary/prerelease/excluded-range/missing/malformed/wrong-environment fixtures and explicit/automatic consumer rejection are delivered by [WIP] Implement shared scoped eligibility decisions and refresh re-evaluation #10878, with actual observation parsing/pinning/error fixtures in feat: observe actual-environment harness versions #11057/fix: correct harness observation runtime support boundary #11064.
- Prove actual selected-harness observation/enforcement on remaining supported Docker/ARC-DinD and NVX paths; live-runtime evidence is not established by deterministic fixtures.
- The shared evaluator/consumers report applicable explicit harness incompatibility or unverified requirements actionably and filter automatic candidates/exhaustion. [WIP] Implement shared scoped eligibility decisions and refresh re-evaluation #10878; preserve fix: recover retired and unavailable models with compatible choices #10763 recovery/opt-outs and fix: warn instead of rejecting models without pricing #10757 unpriced warning semantics. This is contract/consumer coverage, not proof every supported backend produces evidence.
- Phase 5/6 have a documented/tested immutable request-pinned re-evaluation/decision interface. [WIP] Implement shared scoped eligibility decisions and refresh re-evaluation #10878, observation pins in feat: observe actual-environment harness versions #11057/fix: correct harness observation runtime support boundary #11064. Unsupported feed constraints remain rejected; full feed activation is not claimed.
- Generated lifecycle/naming assets and shared identity-resolution logic have host/proxy packaging and outside-checkout coverage. Migrate lifecycle readers to generated data (ADR 0004 phase 4, partial) #10360/Unify model resolution around canonical provider-qualified identities #10681; released in v0.29.1.
- Shared eligibility/observation modules and Cloud Hypervisor producer/host/proxy assets have deterministic and outside-checkout/package inclusion coverage. [WIP] Implement shared scoped eligibility decisions and refresh re-evaluation #10878/feat: observe actual-environment harness versions #11057/fix: correct harness observation runtime support boundary #11064; not live guest proof.
- Extend producer packaging/round-trip evidence to Docker/ARC-DinD, NVX and compiler/overlay integration; retain explicit enclave/session limitations.
Validation and completion handoff
Run targeted lifecycle, shared-contract, config, runtime/probe, policy, selector, routing, and fallback tests for the changed paths. At minimum retain the merged foundation checks:
# Repository root
npm run models:check
npm run build
npm run type-check
npx jest --runInBand src/model-information-contract.test.ts src/copilot-model.test.ts src/copilot-model-catalog-sync.test.ts scripts/model-information/compile.test.ts
# Run separately from containers/api-proxy
npm test -- --runInBand model-information-contract.test.js model-metadata-characterization.test.js guards/model-policy-guard.test.js model-fallback-chain.test.js scoped-auto-model.test.jsAlso run affected retirement, request/routing integration, config transport/schema, actual-runtime harness, and packaging tests. Root Jest does not discover proxy tests. Use deterministic fixtures/probes; no production inference, live workflow dispatch, or external provider calls are required to validate this phase.
Deliver a handoff linking merged prerequisites, lifecycle activation changes, canonical source/output ownership, cross-repository agreement and round-trip evidence, actual-environment detection/comparison semantics, packaging evidence, and Phase 5/6 integration APIs. Leave this issue open if the companion contract/wiring or any other acceptance criterion remains incomplete.
Non-goals / handoff
No kernel build/policy change, native process-hardening addon, new process/controller authentication, protected agent spawn/attestation, private execution-plan ABI, immutable Node/SDK/agent closure distribution, or new isolation architecture. No new pricing resolver/source, live central refresh/cache, runtime-discount accounting, reasoning/context activation, directed translation migration, public model CLI/export rollout, feed publication, broad legacy removal, or unrelated runtime refactor. Phase 5 owns pricing/refresh; Phase 6 owns reasoning/compatibility; Phase 7 exposes resolved data additively through the existing /reflect. Do not add /reflect/v2, endpoint-version negotiation, or a v2-to-v1 fallback.
Activity
test: add provider-free live Docker harness observation jobs (#11075)