Skip to content

ADR 0004 phase 4: migrate lifecycle validation, overlays, and harness eligibility #10294

Done
4 of 4 issues completed

Description

@lpcox

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:

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)

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.

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

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: canonical model, scoped overlay, availability, provenance, and harness contracts. Harness constraints already carry scope, name, scheme, minimum, optional excludedRanges, reason, and provenance.
  • shared/model-information/identity.js and .d.ts: identity, normalizeId, matchModel, and matchFamilyRule. 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.js and .d.ts: validate and validateRecords; reuse schema and complete-set checks rather than creating parallel validators or tables.
  • shared/model-information/sources/ and catalog.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 host supported, retired, and suggestionOrder projection, consumed by src/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 plus auto; it cannot author availability.
  • shared/model-information/target.generated.json and baseline-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

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.js

Also 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.

Sub-issues

Sub-issues

4 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. reopened this on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions