ADR 0004 phase 9: remove legacy model tables after parity and release gates

Open
#10,299 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
github, node.js, typescript
Domain
backend, devtools

Research direction

Start by reviewing ADR 0004 Gate 9 and the completed implementations in src/copilot-model.ts and containers/api-proxy/{model-utils.js,ai-credits-pricing.js,model-api-mapping.js,runtime-model-catalog.js}. Verify the prerequisite phases, downstream adoption, release evidence, and compatibility approval before considering cleanup. Done means all acceptance criteria and operational readiness evidence are satisfied, with generated projections and supported compatibility contracts preserved.

Written by the indexing model from the issue text.

Description

Objective and dependencies

Implement ADR 0004 Gate 9. Parent: #10290. Blocked by unfinished Phases 4-7 (#10294, #10295, #10296, #10297), downstream adoption, a stable release of the remaining high-risk migrations, and explicit compatibility-window approval. Phase 8 (#10298) is delivered. Do not start destructive cleanup merely because prerequisite PRs merged.

Readiness reconciliation (2026-10-31 UTC)

Foundations #10301/#10310/#10317 and lifecycle readers #10360 are merged. #10681 has now shipped canonical identity resolution, bundled naming and packaged shared logic; #10757 changes unpriced usage to warnings; #10763 adds bounded compatible HTTP recovery. All three are included in v0.29.1.

Phase 8's scheduled source upkeep, human-review PRs, automatic publication and authenticated-loader handoff are delivered (#10439/#10466/#10473/#10494/#10624/#10634), with recurring successful runs and published-consumer evidence. Do not describe the updater, producer, loader or naming boundary as unstarted, or build replacements.

Removal is still not ready. Remaining Phase 4 overlays/actual-harness eligibility/compiler round trips, Phase 5 complete resolver/import-scope/shadow parity, Phase 6 reasoning/directed compatibility and Phase 7 full export/downstream adoption have not been established. github/gh-aw#70728 remains open. A stable release containing partial migrations does not meet all release/parity/compatibility-window gates.

Preserve legacy curated/import fallback consumers and required adapters until their replacement criteria are proved. Preserve #10757's explicit unpriced-warning/possible-undercount behavior and #10763's reviewed recovery limits/opt-outs; cleanup must not restore superseded rejection rules or broaden substitutions. Publication v1 remains pricing-only in authority and naming remains bundled. Keep this issue open; no broad deletion is authorized.

Additional merged progress, unchanged removal gate (2026-11-04 UTC)

#10878 completed shared scoped eligibility/consumer/re-evaluation slice #10877 (released in v0.29.5). #11057/#11064 merge shared observation wiring and Cloud Hypervisor primary-guest version evidence, with sbx-specific additions removed. They are not yet in latest release v0.29.6. Deterministic packaging/consumer fixtures do not establish live supported-runtime parity.

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.

Do not delete shared eligibility/observation interfaces or useful characterized tests as obsolete. Docker/ARC-DinD and NVX producers, enclave/opaque/session enforcement, compiler overlays, full pricing/reasoning/export parity, adoption and compatibility approval remain open. Unsupported sbx status is not authorization for global historical backend deletion. Feed harness constraints stay disabled; no legacy removal criterion is completed by this reconciliation.

Scope

Inventory and remove duplicated canonicalizers, mirrored retirement/replacement maps, independently maintained pricing ownership, duplicated mapping ownership, exception-list sync tests, temporary shadow paths/flags, and direct consumers of raw runtime records. Preserve generated compatibility projections and readers wherever a still-supported external contract requires them. Replace pairwise table-sync assertions with canonical compiler/staleness and consumer contract coverage, not less coverage.

Entry points: migrated modules in src/copilot-model.ts, containers/api-proxy/{model-utils.js,ai-credits-pricing.js,model-api-mapping.js,runtime-model-catalog.js}, existing sync/retirement/pricing tests, export/package consumers, updater paths, and temporary migration flags. Inspect the actual completed implementations before deleting anything.

Required readiness evidence

  • Link merged phase PRs, representative old/new parity evidence, stable release identifiers, and agreed compatibility-window approval.
  • No unresolved high-risk shadow mismatch; intentional behavior corrections are documented and tested.
  • gh-aw and router-training use canonical exports with validated accounting/effort parity, or retain required compatibility readers and leave this phase open.
  • Rollback remains possible through an identified previous release and documented operational procedure; runtime downloads never modify bundled assets.

Acceptance criteria

  • Every model-fact consumer reads a generated projection or shared resolver; no handwritten independent source table or duplicate canonicalization remains.
  • Legacy code removal retains public /reflect meanings, persisted/package contracts within the approved support window, and the legacy unversioned overlay input contract until its own migration/deprecation is approved.
  • Delete transitional shadow flags only after their rollout requirements are met; retain valuable characterization fixtures as regression/contract tests.
  • Verify source-to-projection generation, stale-output CI, built/container/package inclusion, host/proxy lifecycle agreement, accounting, routing, and translation rejection end-to-end.
  • Exercise offline/blocked-feed startup, stale/expired fallback, import scope, policy/harness exclusions, unknown efforts, and sanitized reflection/logging after cleanup.
  • Run affected root and separate proxy suites, build/type-check, and appropriate integration/packaging checks; update docs to the final ownership and contributor workflow.

Non-goals

No forced expiry of supported contracts, new model-selection behavior, changes to the current reviewed guard, unpriced-warning or recovery rules, separate /reflect/v2, or unrelated refactor. Close the parent only when all phase criteria and operational readiness evidence are satisfied.

Dominant language
TypeScript
Stars
169
Forks
89
Avg merge
5h 18m
Merged PRs (30d)
450

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-aw-firewall

All issues in github/gh-aw-firewall

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.