Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions apps/cli/src/engine/catalog-metadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,20 @@ describe('catalog-metadata (ADR-0072 P4 — host projection + seed + install + p

it('a reseed CARRIES FORWARD enrichment a refresh had populated — never blanks it (ADR-0072 point 5)', () => {
seedShippedCatalog(store, TS);
const shippedId = Object.keys(CATALOG_SNAPSHOT)[0]!;
// A `models refresh --catalog` populated enrichment on a shipped id (the snapshot itself carries none).
// Pick a shipped id the snapshot leaves WITHOUT a `knowledgeCutoff`, so this test exercises the
// carry-forward branch rather than the snapshot-wins one. The snapshot bakes in modalities and a
// description for every model today, but not always a cutoff.
const withoutCutoff = Object.entries(CATALOG_SNAPSHOT).find(
([, m]) => m.knowledgeCutoff === undefined,
);
// If a future snapshot stamps a cutoff on EVERY model, this test can no longer reach the branch it
// exists for — say so, rather than dying on an unhelpful undefined-index read.
expect(
withoutCutoff,
'no shipped model lacks knowledgeCutoff — pick another carry-forward column',
).toBeDefined();
const shippedId = withoutCutoff![0];
// A `models refresh --catalog` populated enrichment on a shipped id.
store.updateEnrichment([
{
modelId: shippedId,
Expand All @@ -139,10 +151,13 @@ describe('catalog-metadata (ADR-0072 P4 — host projection + seed + install + p
store.upsertMeta({ seededSnapshotSha: 'a-different-sha' });
expect(seedShippedCatalog(store, TS + 1)).toBe(true); // it reseeds
const row = store.readAll().find((r) => r.modelId === shippedId)!;
// Money+wire came from the (re-reviewed) snapshot; enrichment SURVIVED the reseed rather than resetting to NULL.
// The column the snapshot leaves empty SURVIVES the reseed rather than resetting to NULL...
expect(row.knowledgeCutoff).toBe('2099-01');
expect(row.inputModalities).toBe(JSON.stringify(['text', 'image']));
expect(row.description).toBe('fetched');
// ...while a column the snapshot DOES carry wins over the stale DB value, which is the documented
// `?? prior` precedence: the newly-reviewed snapshot is the more trustworthy source for what it states.
const shipped = CATALOG_SNAPSHOT[shippedId]!;
expect(row.inputModalities).toBe(JSON.stringify(shipped.inputModalities));
expect(row.description).toBe(shipped.description);
});
});

Expand Down
4 changes: 2 additions & 2 deletions docs/roadmap/current.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ unanswered**; the remainder sit inline in their own phase-file bullet.
|---|------|----------|----------------|
| D1 | 0 | Mark the `ci` job a **required** check (open since Phase 0) | Yes — every CI item here is advisory until it flips |
| D2 | 0 | Coverage floor: promote to required, or soften `testing.md`? | Promote, **and implement in the same PR** — a checked-in run already shows 92–97% margin |
| D3 | 0 | Accept the upstream Gemini price rise the ADR-0071 §9 guard is refusing? | Accept and regenerate — a stale floor *under*-prices the cap, the dangerous direction |
| D3 | 0 | Accept the upstream price changes the ADR-0071 §9 guard is refusing? | ✅ **Ruled 2026-07-26: take current prices.** Verified: `gemini-flash-latest` moved $0.30→$1.50 in / $2.50→$9.00 out — the shipped floor under-prices by 5×. **Blocked on D3b below** |
| D4 | 0 | Confirm the number reservation (`0013`–`0017`, ADR-0073+) | As listed — one item per number, in landing order |
| D5 | 0 | The binding locale bar: EXIT:6 says five, CLAUDE.md says `en`+`tr` | **Maintainer call.** Either amend EXIT:6 to ship `en`+`tr` with three staged, or keep five and fix the prose. 2.5.5.F assumes the latter |
| D5 | 0 | The binding locale bar | ✅ **Ruled 2026-07-26: ship `en` + `tr`**, catalog architected for n locales, `es`/`fr`/`de` staged. EXIT:6, 2.6.L and 2.5.5.F amended |
| D7 | 0 | Publish v0.1.1 as-is, or supersede with v0.2.0? | v0.2.0 — ADR-0067's Node `>=22` bump is breaking for 0.x |
| D8 | 1 | Do already-persisted approval previews need a scrub? | Yes — migration 0013, same PR. Deleting `history.db` also destroys provider registrations |
| D10 | 1 | `BudgetExceededError`/`BudgetPauseError`: adopt `.code`? | Adopt — must precede Wave 3's `RelaviumError` migration |
Expand Down
4 changes: 2 additions & 2 deletions docs/roadmap/phases/phase-2.5.5-hardening-and-remediation.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ The project's own documentation conventions — cite-not-restate, status banners
- **Repo-wide docs link/index hygiene sweep: four broken relative links, three missing ADR cross-reference pointers, and four stale reference-doc index tables.** Superseded ADR-0021 has no in-body amendment pointer forward to the new Node floor decision. ADR-0069's Related line 404s to a renamed file — it links `0047-cli-render-seam-and-framework-free-cores.md` but the real file is `docs/decisions/0047-cli-framework-commander-ink-clack.md`. ADR-0071's `### K7.` header gives no in-header signal that it belongs to a separate numbering track. An independent repo-wide crawl of every relative markdown link under `docs/` found four genuinely broken links — one of which duplicates the ADR-0069→ADR-0047 link above — plus a wrong-subdirectory link in ADR-0062. Separately, `docs/reference/README.md`'s shared-core table lists only 5 of 11 real files; `docs/standards/documentation-style.md` §6's canonical-artifact registry is missing 6 of 11, including the safety-critical `llm-provider-seam.md`; `docs/reference/shared-core/agent-runner.md` is orphaned from both indexes despite being cited by six other docs; the `docs/reference/cli/` index is missing `accessibility.md` and `regression-harness.md`. Regenerate all four index tables from the real file tree, fix the four broken links, and add the three missing ADR pointers in one coordinated sweep; recommend a CI link-checker afterward to prevent recurrence. *(M · docs/decisions/, docs/reference/README.md, docs/standards/documentation-style.md, docs/reference/cli/ · #123, #124, #126, #143, #151, #251, #252, #253)*
- **Trim two ADRs and one project-structure.md row that restate content already living verbatim in their own cited canonical doc.** ADR-0031 states "canonical types live in `llm-provider-seam.md`" and then spends roughly 250 lines re-deriving the exact same content that file already carries. ADR-0027's addendum states exact sandbox resource-cap numbers that already live in `expression-sandbox-spec.md`, even after the ADR's own preamble names that spec the single canonical home. `docs/project-structure.md`'s Apps table restates a hand-picked, now-stale CLI subcommand list instead of linking to `docs/reference/cli/commands.md`, which already owns it canonically, and has drifted out of sync as a direct result. All three are the identical CLAUDE.md rule-8 violation — trim each ADR to drivers/tradeoffs plus a citation, and replace the stale restated list with a link. *(M · docs/decisions/0031-*.md, docs/decisions/0027-*.md, docs/project-structure.md · #120, #121, #257)*
- **Add three missing rows/notes to `tech-stack.md`, the single source of truth for pinned choices.** `docs/tech-stack.md` omits `smol-toml` and `string-width` as ADR-backed runtime dependencies (both already shipped and in `package.json`), and is missing an MCP SDK shape-tradeoff note that should cross-reference ADR-0034. The Playwright e2e row is the one un-flagged not-yet-applicable row in an otherwise carefully phase-annotated doc. Add the two missing dependency rows, the tradeoff note, and the same Phase-3 flag every other not-yet-applicable row already carries, in one pass. *(S · docs/tech-stack.md · #246, #247, #140)*
- **Rewrite CLAUDE.md's and README.md's shared i18n-status clause: wrong on stage, wrong on language count, repeated in both files.** `CLAUDE.md`'s "What this project is" section lists "settings/theming/`en`+`tr` localization" as in-progress Phase 2.6 scope, reading as already shipping — an exhaustive grep for i18n/locale/translation scaffolding across `apps/cli` finds zero hits; the theme hasn't started at all. The same clause also undercounts scope: `docs/roadmap/phases/phase-2.6-conversational-authoring.md` states the real target three times as `en, es, tr, fr, de`, and `README.md` repeats the same en/tr undercount. One rewrite of the shared clause in both `CLAUDE.md` and `README.md`, stating the correct five-language target with an explicit not-started qualifier, fixes all three. *(S · CLAUDE.md, README.md · #74, #260, #134)*
- **Rewrite CLAUDE.md's and README.md's shared i18n-status clause: wrong on stage, wrong on language count, repeated in both files.** `CLAUDE.md`'s "What this project is" section lists "settings/theming/`en`+`tr` localization" as in-progress Phase 2.6 scope, reading as already shipping — an exhaustive grep for i18n/locale/translation scaffolding across `apps/cli` finds zero hits; the theme hasn't started at all. The language count is now settled by maintainer ruling (2026-07-26): the catalog is architected for n locales but **`en` + `tr` are what ship in Phase 2.6**, with `es`/`fr`/`de` staged — so the existing en/tr wording is correct on scope and wrong only on stage. One rewrite of the shared clause in both `CLAUDE.md` and `README.md`, adding an explicit not-started qualifier and naming the staged locales, fixes all three. *(S · CLAUDE.md, README.md · #74, #260, #134)*
- **Add the six load-bearing terms missing from the glossary and refresh its stale "Last updated" header.** `docs/glossary.md` omits `ExecutionHost`, `ToolHost`, `ActionGuard`, `MediaStore`, `WorkflowEngine`, and `BudgetGovernor` — terms that recur across the ADR corpus without a defined home — and its "Last updated" header is over a month stale relative to the file's own content. Bundle both fixes into the same edit. *(S · docs/glossary.md · #135, #137)*
- **Swap `docs/architecture/README.md`'s recommended reading order to match both target docs' own stated shipping order.** The recommended order puts `cloud-phase-2.md` before `managed-inference.md`, contradicting both documents' own stated shipping/dependency order (managed inference is Phase 5, cloud execution is Phase 6). Swap the two entries. *(S · docs/architecture/README.md · #157)*
- **Add the missing `style` commit type to `commit-style.md`'s enumerated Types list.** `docs/standards/commit-style.md` enumerates `feat`, `fix`, `refactor`, `perf`, `test`, `docs`, `chore`, `build`, `ci` but omits `style`, which real repo history already uses (e.g. `style: prettier the ADR-0072 files`, HEAD-2). Add it to the documented list so the doc matches actual practice. *(S · docs/standards/commit-style.md · #158)*
Expand All @@ -354,7 +354,7 @@ The project's own documentation conventions — cite-not-restate, status banners
- **Correct the doc comment on `urlSourceSchema` that asserts the opposite of the flag's actual current state.** A doc comment attached to `urlSourceSchema` (a security-relevant media feature flag) states the flag's behavior backwards from what the code actually does today. Correct the comment to match the real, current gating. *(S · packages/shared/src/content.ts (or the file defining `urlSourceSchema`) · #238)*
- **Sync `agent-runner.md`'s documented `cost:updated` payload with the `priced` boolean field ADR-0070 added.** `docs/reference/shared-core/agent-runner.md` predates ADR-0070 and its documented `cost:updated` event payload is missing the `priced` boolean field ADR-0070 added to `CostUpdatedEventSchema`. Add the field to the documented shape and cite ADR-0070 as the source. *(S · docs/reference/shared-core/agent-runner.md · #145)*

**Acceptance:** no canonical doc names the retired `pricing.ts` `MODEL_PRICING` table as the pricing authority; every reference to an unbuilt surface (desktop, VS Code, `apps/api`/`portal`, `packages/ui`) carries the same not-yet-shipped marker convention already used correctly elsewhere in the corpus, at all twenty flagged sites; every reference-doc index (`docs/reference/README.md`, `docs/reference/shared-core/README.md`, `documentation-style.md` §6, `docs/reference/cli/` index) lists every real file in its directory with zero broken relative links, verified by a link-check pass; `packages/mcp` appears in all five package-inventory tables/diagrams including the reviewer agent's own checklist; every roadmap status banner (`current.md`, `AGENTS.md`, the phase-2.6 and phase-3 banners) matches the state recorded in the file it summarizes, with the 2.6.Q "seven decisions" figure corrected to six; the chat tutorial and onboarding path reflect that `chat.ts` ships today; `node-types.md`'s `merge_strategy`/`human_in_the_loop_config` claims match the schema and engine exactly; the three hardcoded-path skills run correctly from a fresh clone via `` `$(git rev-parse --show-toplevel)` ``; `commit-style.md` lists `style` as a valid type; the glossary defines all six missing terms and its date header is current; CLAUDE.md and README.md state the i18n theme as not-started with the correct five-language (`en, es, tr, fr, de`) target. The two blocked items (`overview.md`'s LLM→Keychain edge, Home's `showCost` wiring) surface as explicit open questions in the phase file rather than being silently resolved by guess.
**Acceptance:** no canonical doc names the retired `pricing.ts` `MODEL_PRICING` table as the pricing authority; every reference to an unbuilt surface (desktop, VS Code, `apps/api`/`portal`, `packages/ui`) carries the same not-yet-shipped marker convention already used correctly elsewhere in the corpus, at all twenty flagged sites; every reference-doc index (`docs/reference/README.md`, `docs/reference/shared-core/README.md`, `documentation-style.md` §6, `docs/reference/cli/` index) lists every real file in its directory with zero broken relative links, verified by a link-check pass; `packages/mcp` appears in all five package-inventory tables/diagrams including the reviewer agent's own checklist; every roadmap status banner (`current.md`, `AGENTS.md`, the phase-2.6 and phase-3 banners) matches the state recorded in the file it summarizes, with the 2.6.Q "seven decisions" figure corrected to six; the chat tutorial and onboarding path reflect that `chat.ts` ships today; `node-types.md`'s `merge_strategy`/`human_in_the_loop_config` claims match the schema and engine exactly; the three hardcoded-path skills run correctly from a fresh clone via `` `$(git rev-parse --show-toplevel)` ``; `commit-style.md` lists `style` as a valid type; the glossary defines all six missing terms and its date header is current; CLAUDE.md and README.md state the i18n theme as not-started, shipping `en` + `tr` with `es`/`fr`/`de` staged (the 2026-07-26 ruling). The two blocked items (`overview.md`'s LLM→Keychain edge, Home's `showCost` wiring) surface as explicit open questions in the phase file rather than being silently resolved by guess.

### 2.5.5.G — Codebase hygiene: naming, duplication & dead code

Expand Down
Loading
Loading