Skip to content

fix(load): unblock first load of an absent extension - #54

Merged
zeegin merged 2 commits into
IngvarConsulting:masterfrom
zeegin:fix/issue-355-first-load-absent-extension
Sep 2, 2026
Merged

zeegin merged 2 commits into
IngvarConsulting:masterfrom
zeegin:fix/issue-355-first-load-absent-extension

Conversation

@zeegin

@zeegin zeegin commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

Migrated from alkoleft/v8-runner-rust pr #54.
Original author: zeegin; created: 2026-08-14T14:21:16Z.
Upstream historical base: 7ce1b062; original head: 442cfc0e.
This PR was rebuilt on the IngvarConsulting fork and the original attribution is preserved here.

Problem

The first load of a CFE absent from the infobase is blocked by the compatibility probe. On platform 8.3.27.2130 Designer returns non-zero with the exact /Out line:

Конфигурация 'Расширение конфигурации' недоступна

The migrated patch originally widened substring matching to unavailable and Unicode-lowercased every branch. Independent review found that this could combine unrelated extension and server/license diagnostics and authorize a mutating /LoadCfg.

Downstream reproduction: IngvarConsulting/unica#355

Rebuilt contract

  • Adds the explicit JSON state compatibility_state: "absent" for v0.6.
  • Allows load + absent for the first installation.
  • Rejects merge + absent with an actionable first-installation hint.
  • Accepts the observed absent state only from one exact clean current /Out diagnostic, with empty stdout/stderr, no interruption, no read error, and no extra lines.
  • Uses a closed whole-diagnostic allowlist for other non-zero compatibility outcomes; independent substrings are never combined.
  • Returns every unclassified non-zero probe as a platform failure and never runs /LoadCfg or /MergeCfg.
  • Fails before spawning Designer when the previous /Out cannot be removed, preventing stale evidence reuse.
  • Keeps unverified English/localized wording fail-closed until a real wire capture is available.

The public and safety contract is recorded in ADR-0023 and spec/architecture/invariants.md.

Verification

Passed locally:

  • cargo fmt --check
  • git diff --check
  • cargo test --locked --bin v8-runner load_artifact — 22 passed
  • cargo test --locked --test cli_load — 9 passed
  • independent tester, reviewer, skeptic, and Rust-expert passes; final reviewer and Rust expert reported no remaining actionable findings

Regression coverage includes first install order CompareCfg -> LoadCfg -> UpdateDBCfg, absent JSON serialization, merge hint, BOM/CRLF, mixed stdout/stderr/log evidence, access/auth/license/connection errors, unreadable /Out, stale /Out, and unverified English wording.

The broad local contract suite still has the fork's pre-existing macOS environment failures (path canonicalization and process startup timeouts). GitHub CI is the merge gate for the rebuilt head.

@zeegin zeegin added the upstream-migrated Migrated from the historical upstream tracker label Sep 2, 2026
@zeegin

zeegin commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Upstream comment by coderabbitai[bot] at 2026-08-14T14:21:47Z: original

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: df0c1ae8-34d7-4863-b892-1b32fcb89e07

📥 Commits

Reviewing files that changed from the base of the PR and between 7ce1b06 and 442cfc0.

📒 Files selected for processing (1)
  • src/use_cases/load_artifact.rs

Walkthrough

Классификатор ошибок пробирования теперь корректно обрабатывает Unicode-регистр и дополнительные английские и русские сообщения о недоступных расширениях. Тесты проверяют состояние NotSupported для таких сообщений и Unknown для нерелевантной ошибки.

Changes

Классификация ошибок пробирования

Layer / File(s) Summary
Обновление классификатора
src/use_cases/load_artifact.rs
classify_probe_failure использует to_lowercase() и распознаёт сообщения unavailable, not available и недоступ.
Тесты классификатора
src/use_cases/load_artifact.rs
Добавлены проверки английских и русских сообщений с состоянием NotSupported, а также нерелевантной ошибки с состоянием Unknown.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 442cf

The PR narrowly expands compatibility-error classification so the first load of an absent extension can proceed; no actionable merge-blocking risk remains after normal checks and review.

Poem

Я兔ик вижу: регистр стал точней,
Русский текст распознан теперь быстрей.
Расширение недоступно — NotSupported,
Ошибка чужая — Unknown сохранён.
Тесты прыгают в строках: раз, два, три!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Заголовок точно описывает основное изменение: исправление первой загрузки отсутствующего расширения.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @​coderabbitai help to get the list of available commands.

- classify Designer's "Конфигурация 'Расширение конфигурации' недоступна"
  as NotSupported, so `load --mode load` proceeds on the first load of an
  extension the infobase does not carry yet instead of failing the
  compatibility probe with `failed to determine infobase compatibility state`
- switch the probe classifier to Unicode `to_lowercase`; `to_ascii_lowercase`
  leaves Cyrillic untouched, so every Russian branch silently never matched a
  capitalised platform diagnostic
- cover the absent-extension wording in ru and en, and keep unrelated
  extension probe failures classified as Unknown
- distinguish absent extensions in the v0.6 JSON contract
- require exact clean diagnostics before mutating an infobase
- preserve unknown probe failures as platform errors
- prevent stale Designer logs from authorizing a load
- cover first install and conflicting evidence end to end
@zeegin
zeegin force-pushed the fix/issue-355-first-load-absent-extension branch from 442cfc0 to 689988c Compare September 2, 2026 19:08
@zeegin
zeegin merged commit b349f16 into IngvarConsulting:master Sep 2, 2026
7 of 8 checks passed
@zeegin zeegin added this to the v0.6 milestone Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream-migrated Migrated from the historical upstream tracker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant