fix(runtime): isolate state by infobase - #39
Conversation
- define secret-free versioned runtime identity and bootstrap semantics - specify private CDFI, shadow merge, journal recovery, and exact receipts - add the test-driven implementation plan for issue 30
- derive secret-free versioned identities for infobases and source contexts - route change detection through per-infobase storage with explicit bootstrap semantics - propagate identity failures through typed use-case boundaries without panics
- validate normalized targets and raw SHA-256 transitions - preserve pre-platform observations across full and partial flows - exclude runtime artifacts from managed source inventories
- stage managed sources and private CDFI outside source trees - commit CDFI and hash observations through recoverable journals - prevent concurrent state replacement with exact no-clobber claims
- commit EDT observations only after downstream convergence - preserve per-infobase lifecycle across backends and restarts - resolve relative tool-extension sources against project base
- merge baseline source and dump states without overwriting conflicts - recover manifest publication and coherent runtime generations - report exact per-file dump receipts across all modes
- describe private build and dump state lifecycle - document exact receipts and recovery tokens - update operator guidance and superseded ADR clauses
- cover incremental and partial no-clobber conflicts - validate private CDFI lifecycle in trusted live smoke - harden fixture setup across CI and macOS bash
- propagate hard storage lookup failures during recovery - support symlinked source roots without leaking excluded files - align documentation and remove review-reported duplication
- preserve per-infobase private state and source transactions - integrate partial selectors, IBCMD data isolation, and upstream launch changes - reconcile dump tests and docs with shadow bootstrap semantics
Warning Review limit reached
Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (25)
WalkthroughВведено изолированное per-IB runtime state под ChangesRuntime state and contracts
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
@coderabbitai review |
✅ Action performedReview finished.
|
Исправления по CodeRabbit опубликованы в b90dde1. Помимо четырёх inline findings:
Отдельный Rust expert review обнаружил связанный fail-closed риск: hard/concurrent storage errors маскировались через is_ok_and во время journal recovery. Теперь только Recoverable трактуется как mismatch; Hard и ConcurrentStateModified прерывают recovery до rollback. Регрессионный тест подтверждает сохранение journal и staged artifacts. Проверки: cargo fmt, cargo check --all-targets, architecture 4/4, targeted unit 76/76, CLI 49/49, новые regressions 3/3. Независимые tester/reviewer/Rust expert проходы — CLEAN. Предупреждение CodeRabbit о blanket docstring coverage принято как waiver: проект не требует документировать все private helpers, а массовые комментарии не улучшают публичный контракт. Новые и изменённые публичные/инвариантные контракты документированы адресно. |
Закрываю текущий PR #39 и разделю изменения на несколько меньших PR. @korolevpavel @zeegin |
Actionable comments posted: 4 🧹 Nitpick comments (5)
🤖 Prompt for all review comments with AI agents🪄 Autofix (Beta)Fix all unresolved CodeRabbit comments on this PR:
ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (67)
|
|
|
|
|
|
|
|
|
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Экранируйте Символ Предлагаемое исправление-| `dump` | `format=EDT` + `builder=DESIGNER|IBCMD` | Reverse sync через private Designer/configured-source shadows и EDT import |
+| `dump` | `format=EDT` + `builder=DESIGNER\|IBCMD` | Reverse sync через private Designer/configured-source shadows и EDT import |📝 Committable suggestion
🧰 Tools🪛 markdownlint-cli2 (0.23.0)[warning] 36-36: Table column count (MD056, table-column-count) 🤖 Prompt for AI AgentsSource: Linters/SAST tools ✅ Addressed in commit b90dde1 |
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Проверяем, существуют ли ADR-0021/0022 и упомянуты ли они в обзоре
fd -t f . spec/decisions | rg -n '00(21|22)-' || echo "нет файлов ADR-0021/0022"
rg -n 'ADR-0021|ADR-0022' spec/architecture/arc42/09-architecture-decisions.md || echo "нет ссылок в обзорной таблице"Repository: alkoleft/v8-runner-rust Length of output: 335 Добавьте ADR-0021 и ADR-0022 в обзорную таблицу 🤖 Prompt for AI Agents✅ Addressed in commit b90dde1 |
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
На Line 543 при неудачном 🛡️ Предлагаемое выравнивание с `load_state` let database = match Database::open(&self.path) {
Ok(database) => database,
- Err(_error) if !self.path.exists() => return Ok(None),
+ Err(_error) if matches!(self.path.try_exists(), Ok(false)) => return Ok(None),
Err(error) => return Err(map_database_error(&self.path, error)),
};📝 Committable suggestion
🤖 Prompt for AI Agents✅ Confirmed as addressed by @korolevpavel |
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Как формируется путь, передаваемый в DesignerSourceTransaction::create / load_context.path()
rg -nP -C3 'DesignerSourceTransaction::create' src/use_cases
rg -nP -C3 '\bcanonicaliz' src/use_cases/build_project.rs src/use_cases/build_project/coordinator.rs src/use_cases/build_project/helpers.rsRepository: alkoleft/v8-runner-rust Length of output: 3446 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== tool_extension ==\n'
sed -n '410,470p' src/use_cases/tool_extension.rs
printf '\n== build_project ==\n'
sed -n '520,555p' src/use_cases/build_project.rs
printf '\n== source_transaction create / tests around symlinks ==\n'
sed -n '1,220p' src/use_cases/source_transaction.rs | sed -n '1,220p'
printf '\n-- symlink-related tests --\n'
sed -n '620,725p' src/use_cases/source_transaction.rs
printf '\n== source_publication symlink test lookup ==\n'
rg -n -C3 'publication_accepts_a_symlinked_configured_root|symlinked configured root|symlink' src/use_cases/source_publication.rs src/use_cases -g '!src/use_cases/source_transaction.rs'Repository: alkoleft/v8-runner-rust Length of output: 48592 🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C2 'fn path\(|load_context\.path\(|canonicaliz' src/use_cases src -g '!**/target/**'Repository: alkoleft/v8-runner-rust Length of output: 50379 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== source_transaction copy path ==\n'
sed -n '300,470p' src/use_cases/source_transaction.rs
printf '\n== scanner policy ==\n'
sed -n '1,130p' src/change_detection/scanner.rs
printf '\n== source_transaction symlink tests around root acceptance ==\n'
rg -n -C2 'symlinked configured root|symlinked_source|configured root|accepts.*symlink|rejects.*symlink' src/use_cases/source_transaction.rs src/use_cases/build_project.rs src/use_cases/tool_extension.rsRepository: alkoleft/v8-runner-rust Length of output: 11809 🌐 Web query:
💡 Result: In the walkdir crate, if the root directory is a symbolic link, it is always followed for the purposes of directory traversal, regardless of the follow_links setting [1][2][3]. This behavior is controlled by a separate configuration method called follow_root_links [1][3]. By default, follow_root_links is enabled [1][3]. When enabled, if the root path is a symlink that points to a directory, walkdir will resolve the link and traverse the contents of that directory [1][3]. If the root symlink is broken or leads to a loop, an error will be yielded as the first entry [1][3]. The follow_links setting (which defaults to false) controls whether symbolic links encountered during the recursive descent are followed [1][3][4]. Crucially, even when follow_links is set to false, the root entry itself remains subject to the follow_root_links configuration [1][2]. If you explicitly disable follow_root_links(false), walkdir will treat the root symlink as a file/entry itself, effectively preventing it from descending into the target of that link [1][3]. Citations:
🤖 Prompt for AI Agents✅ Confirmed as addressed by @korolevpavel |
Исправлено в b90dde1: экранированы все четыре значения DESIGNER|IBCMD в таблице. Вне таблицы значения не изменялись. |
Исправлено в b90dde1. После ошибки Database::open выполняется полный разбор try_exists: Ok(false) означает отсутствие, Ok(true) сохраняет database error, Err преобразуется в hard filesystem lookup error. Добавлены ENOTDIR-регрессия и fail-closed recovery-тест, сохраняющий journal/staged artifacts. |
Исправлено в b90dde1: ADR-0021 и ADR-0022 добавлены между ADR-0020 и ADR-0023 с точными названиями, ссылками, статусами и датами. |
Исправлено в b90dde1: staging работает от canonical physical root, а excluded roots переносятся из configured namespace в canonical namespace. Unix-регрессия подтверждает поддержку root-симлинка, исключение вложенного каталога и запрет следования вложенным симлинкам. |
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
Что сделано
ib-state/v1;ConfigDumpInfo.xml: Designer и EDT работают через приватные транзакционные копии;SKILL/SKILL.md.Проверки
cargo fmt --all -- --check;cargo check --all-targets --offline;Closes upstream #30
Summary by CodeRabbit
Новые возможности
Исправления
Документация