feat(build): add --dynamic flag and infobase.unlock_code config - #8
feat(build): add --dynamic flag and infobase.unlock_code config#8zeegin wants to merge 3 commits into
Conversation
- CLI flag `--dynamic` for `build` enables /UpdateDBCfg -Dynamic+ - New config field `build.dynamicUpdate` (default false), CLI overrides config - New config field `infobase.unlock_code` propagates /UC <value> to DESIGNER - Mask unlock_code in command-render logs like password (/UC ***) - Propagate dynamic flag through BuildRequest, McpBuildProjectRequest and the execute_source_set_step pipeline; `load` and tool-extension flows keep the historical static update - Bump version 0.4.2 -> 0.5.0 - Regenerate JSON schemas for v8project.yaml / v8project.local.yaml
- force static update for test prerequisite builds - cover dynamic update mapping for MCP and EDT Designer builds - refresh config schemas and docs for dynamic update behavior
- document that empty unlock_code omits /UC - refresh generated config schemas
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughДобавлены опциональный infobase.unlock_code и конфигурация build.dynamicUpdate, CLI-флаг ChangesПоддержка динамического обновления и кода разблокировки
Sequence Diagram(s)sequenceDiagram
participant CLI as "CLI (--dynamic)"
participant MCP as "MCP build_project"
participant BuildReq as "BuildRequest"
participant Config as "AppConfig"
participant Resolver as "resolve_dynamic_update"
participant Coordinator as "run_build_designer/run_build_edt"
participant Designer as "DesignerDsl::update_db_cfg"
participant V8Conn as "V8Connection (args)"
participant Renderer as "Process::render_command"
CLI->>BuildReq: sets dynamic=true
MCP->>BuildReq: dynamicUpdate=Some(true)
BuildReq->>Resolver: provide per-invocation override
Config->>Resolver: provide build.dynamic_update default
Resolver->>Coordinator: effective dynamic flag
Coordinator->>Designer: call update_db_cfg(extension, dynamic)
V8Conn->>Designer: args() includes /UC <code> (if set)
Designer->>Renderer: command includes /UpdateDBCfg -Dynamic+ (if dynamic)
Renderer->>Renderer: mask /UC and -UC in rendered output
🎯 3 (Умеренная) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
Actionable comments posted: 1 🧹 Nitpick comments (2)
🤖 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 selected for processing (22)
|
🧹 Nitpick comments (1)
🤖 Prompt for all review comments with AI agentsℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✅ Files skipped from review due to trivial changes (3)
🚧 Files skipped from review as they are similar to previous changes (3)
|
Здесь dynamic update не отключается для prerequisite build. Line 81 передаёт Предлагаемое исправление &BuildArgs {
full_rebuild: false,
source_set: None,
- // `test` always rebuilds with the project default (`build.dynamicUpdate`); the
- // ergonomic CLI for one-shot dynamic remains `build --dynamic && test`.
- dynamic_update: None,
+ // `test` always forces static update mode for its prerequisite build.
+ dynamic_update: Some(false),
},📝 Committable suggestion
🤖 Prompt for AI Agents✅ Addressed in commit e4b5845 |
Summary
Adds two related capabilities required when the configuration database is protected by an
exclusive lock or by an admin-set password:
--dynamicflag forbuild— emits/UpdateDBCfg -Dynamic+so the build can runwhile the infobase has live HTTP services or background jobs holding the exclusive lock.
infobase.unlock_codeconfig field — propagates/UC <value>to every DESIGNERinvocation. Without it any administrative operation against a locked infobase is rejected
by the platform.
Behavior
v8-runner build --dynamic. Equivalent project-wide default:build.dynamicUpdate: trueinv8project.yaml. CLI overrides config for one invocation.infobase.unlock_code: '<code>'. Empty value is treated as "no unlockcode" so
unlock_code: ''overlays do not accidentally push/UCwithout a value./UC <value>is masked in command-render logs the same way the password is masked(
/UC ***), so it never ends up in build logs / agent traces.dynamicflag is threaded throughBuildRequest,McpBuildProjectRequestand theexecute_source_set_steppipeline. Theloadand tool-extension flows keep the historicalstatic
/UpdateDBCfg(no-Dynamic+), matching the upstream conservative default.Failure modes
surfaces that error verbatim and does NOT fall back to a static update — the operator
decides whether to retry without
--dynamic(and gain exclusive access first).unlock_codeproduces the platform's own "code mismatch" error fromDESIGNER; no v8-runner-side guessing.
Why both at once
Locked infobases in production typically combine both safeguards (password-protected DBCfg
and active sessions). Splitting these into two PRs would force one to land first without
a usable end-to-end path. They share the same plumbing (BuildRequest, designer.rs render,
schema regen, version bump 0.4.2 → 0.5.0).
Files
src/cli/args.rs,src/cli/execute.rs—--dynamicflag wiring.src/config/{loader,model,schema,validate}.rs—build.dynamicUpdateandinfobase.unlock_codeparsing/validation.src/use_cases/request.rs,src/use_cases/build_project*.rs,src/use_cases/run_tests/coordinator.rs,src/use_cases/load_artifact.rs,src/use_cases/tool_extension.rs.src/platform/connection.rs(/UCargv),src/platform/designer.rs(
-Dynamic+),src/platform/process.rs(log masking).src/mcp/{port,request,service}.rs— propagatedynamicover MCP.docs/CAPABILITIES.md,docs/CONFIGURATION.md,SKILL/references/{config-and-backends,project-workflows}.md.docs/schemas/v8project*.schema.jsonregenerated.Testing
cargo build --releasepasses on Linux (gcc).gbig_pam_ai(8.3.27.2074) —/UCreaches DESIGNER in argv,/UpdateDBCfg -Dynamic+is emitted when--dynamicis set, masked properly in logs.Note
Rebased on top of latest
upstream/master(postchore(release): bump version to 0.5.0).Cargo.lock auto-merged. Conflicts were limited to the schema
$idURL (resolved by keepingthe upstream
masterURL) and a doc path moved fromv8-runner/references/toSKILL/references/in upstream (content reapplied in the new location).Summary by CodeRabbit
Новые функции
Документация