Repository navigation
[CTX-1887] fix(panel): refuse to bind a provider contract newer than the runtime — seam only (bitty#3239 row 13 stays open, implemented-only/unwired) - #3242
Conversation
…er provider contract (bitty#3239 row 13)
`PlaceholderReason::Incompatible` had no producer. `PanelEdgeRelease.reason`
was only ever `unloaded`/`disabled`/`reloaded`/`crashed`, and the one versioned
provider record, `PanelProviderManifest`, refused every schema other than 1 at
`parse`, so the skew could not be expressed at all: a panel whose provider
speaks a newer contract than this runtime was indistinguishable from a panel
whose provider is not installed, and the placeholder vocabulary was reachable
only from tests that constructed the reason token by hand.
The provider gate now admits a manifest above `PROVIDER_MANIFEST_VERSION_V1`
and `PanelProviderManifest::requires_newer_runtime` names what was admitted, so
the declaration survives as a registered record instead of being deleted at the
gate. Registration is still not a bind: `PanelRuntime::provider_manifest` is the
read-only accessor the bind edge needs to observe it.
The producer is the restore edge (`Runtime::restore_one_panel`). A record whose
driver answers `Installed` but whose registered provider manifest requires a
newer runtime does not first-bind: `provider_contract_outruns_runtime` refuses
the bind, the fresh container is retained, and
`present_placeholder(.., "incompatible")` writes the Core-owned placeholder. No
grant, no controller generation, no mount, no layout or focus op: the container
keeps exactly the allocation epoch it was created with. A driver that registered
no provider manifest, or one at the schema this runtime reads, binds unchanged.
Test discrimination (each row, and the production line that turns it red when
reverted):
* `registry::provider::tests::a_newer_manifest_is_admitted_and_declares_it_needs_a_newer_runtime`
(lib) -- red when `PanelProviderManifest::parse` goes back to
`version != PROVIDER_MANIFEST_VERSION_V1`, because the v2 manifest never
exists to register.
* `tests/panel_restore_path.rs::a_provider_manifest_newer_than_the_runtime_keeps_the_container_with_an_incompatible_placeholder`
-- red when the `provider_contract_outruns_runtime` branch of the
`PanelDriverAnswer::Installed` arm in `Runtime::restore_one_panel` is reverted
to bind unconditionally (observed: `Bound { grants: {"panel.create",
"panel.focus"} }` and no placeholder).
* `tests/panel_restore_path.rs::a_provider_manifest_at_the_supported_schema_still_first_binds`
-- the control for the same line: red if the gate refuses every registered
provider instead of comparing `version()` (observed: over-broad gate turns it
and the pre-existing first-bind row red).
Sabotage runs for the two code lines above were executed and reverted; the
failing output is quoted in the PR body.
Also corrected the test-harness record that claimed the gap: the PGO-11 note in
`tests/panel_generation_ownership.rs` now names the restore edge as the homed
half and still states, rather than implies, which direction remains unmeasured
(no `bitty.panel.create`/rebind path reads a provider manifest, and the
persisted record carries identity, not provider content).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit details
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. |
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review lane (guard-dispatched)
Reviewed head 195be5b769aa33e9c7416da3a2d1e7479c15085a against base 335d3d0d. I read the full diff, traced every caller of PanelProviderManifest::parse / ProviderContractError, ran the MSRV, clippy, rustdoc and the three named rows, and re-ran all three claimed sabotage mutations in a scratch copy of the tree.
-
PASS — version gate is exactly as claimed.
parserefuses only0(crates/bitty-runtime/src/registry/provider.rs:152) and still returnsProviderContractError::UnsupportedVersion { version }with the value carried (provider.rs:153). No call site depended on the old!= 1refusal: every caller ofparseis a test (provider.rs:388,397,410,419,423,433,453;tests/cw_contracts.rs:79,171;tests/cw_integrate.rs:191;tests/panel_restore_path.rs:507), and production has no caller at all.UnsupportedVersionis produced only atprovider.rs:153; thectl/render.rs:89,112hits are the unrelated server-error string taxonomy. No code applies a manifest payload: the only production readers aredeclares()increate_panel_for_provider(registry/host.rs:1218) and the new skew check, and the former has no non-test caller either. So admitting>= 1cannot cause a newer manifest to be applied anywhere today. -
FAIL — the skew is not reachable from production; this is implemented-only (unwired), not a consuming path. The call chain itself is real:
Runtime::load_session_from_path(runtime/session.rs:1722) →apply_session_snapshot(session.rs:1252) →commit_panel_restore(session.rs:1463) →restore_one_panel(runtime/panel_restore.rs:459) → gate atpanel_restore.rs:511. But the gate can never be true outside tests:PanelRuntime::register_panel_provider(registry/host.rs:1163) has no caller outsidecrates/bitty-runtime/tests/, soprovider_manifest(owner)(host.rs:1198) is alwaysNonein production andprovider_contract_outruns_runtime(panel_restore.rs:552-555) is constantfalse. Independently, the panel step's input is never produced in production either:set_panel_restore_records(panel_restore.rs:355) is called only from tests, and both constructors seedpanel_restore_inputs: Vec::new()(runtime.rs:2589,2927), soapply_session_snapshotrestores zero panels. Both preconditions of the new branch are test-only, sopresent_placeholder(.., "incompatible")atpanel_restore.rs:512is unreachable in a shipped binary. By the PGO-11 note's own standard (a test-side token does not count as a producer), row 13 is still unmet: the PR adds a second unreachable arm next to the pre-existingOlderarm (panel_restore.rs:523), which already presentedincompatibleon the same unwired step. -
PASS — fail-closed on the incompatible outcome.
present_restored_placeholderonly callspresent_placeholder(id, allocation_epoch, token)(panel_restore.rs:594-600); the registry writes onlyrecord_mut.placeholder(registry/panel.rs:2544-2548) and never allocates a controller generation (that happens solely inbind_restored_panelviarebind_panel,panel_restore.rs:579-590). Withbound == Nonetherelease_generation_scopebranch atregistry/panel.rs:2519-2525is skipped, so no grant is added on the allocation epoch, andcreate_panelleavesPanelState::Createdwith no mount/layout/focus op. The container is disposed only when the outcome isDropped(panel_restore.rs:527-531);Placeholderis returned and retained (panel_restore.rs:600-610). The row also proves the grant assertion is non-vacuous:resolution()is{panel.create, panel.focus}(tests/panel_restore_path.rs:138-144), andassert_nothing_was_grantedchecks both against the allocation epoch (tests/panel_restore_path.rs:521-537). -
PASS — the new rows discriminate, and the 3-sabotage claim reproduces. At head:
cargo test --test panel_restore_path→ 9 passed (both new rows included); libregistry::provider::tests→ 7 passed. I re-ran the three mutations in/home/fuyu/.hermes/cache/scratch/review-3242/repo(never the lane worktree):provider_contract_outruns_runtimeforcedfalse→ only the new row fails, attests/panel_restore_path.rs:441:left: 1, right: 0, outcomeBound { grants: {"panel.create","panel.focus"} }— matches the PR body verbatim.- forced
true→7 passed; 2 failed:a_provider_manifest_at_the_supported_schema_still_first_binds(line 497) anda_session_restore_mints_a_fresh_panel_id_and_first_binds_the_installed_driver— matches the PR body. parsereverted toversion != PROVIDER_MANIFEST_VERSION_V1→ lib6 passed; 1 failed(UnsupportedVersion { version: 2 }atprovider.rs:454) andpanel_restore_path8 passed; 1 failedat line 513 — matches the PR body.
The production lines to revert are thereforeprovider.rs:152for the lib row andpanel_restore.rs:511for both integration rows. No assertion reads a value derived from the container it asserts on:report.bound()/outcomeis the Core return value, whileunbound_reason(tests/panel_restore_path.rs:151-158) andassert_placeholder_kept_the_container(:540-565) read the host registry's placeholder, controller generation, state, workspace list and built placeholder block — independent surfaces.
-
PASS — MSRV 1.85 and lint safety.
cargo +1.85 check -p bitty-runtime --tests --offline→ exit 0.cargo clippy -p bitty-runtime --all-targets -- -D warnings→ exit 0.RUSTDOCFLAGS="-D warnings" cargo doc -p bitty-runtime --no-deps→ exit 0 (soPanelRuntime::provider_manifest's link toPanelProviderManifest::requires_newer_runtimeand thebitty_ui::panel_recovery::PlaceholderReason::Incompatiblelink resolve;PanelProviderManifestis imported atregistry/host.rs:94). The new hunks use a plainif/elseandOption::is_some_and(panel_restore.rs:502-516,552-555) — no let-chains, noif letguards, nothing cfg-gated, andrequires_newer_runtimeis aconst fncalled from non-test code (panel_restore.rs:554), so no dead-code path. -
PASS — scope and doc corrections. The body explicitly names the unwired halves: "Provider registration still has no application caller (
register_panel_provideris reached only frombitty-runtimetests)" and "nobitty.panel.create/rebind path reads a provider manifest". It usesRelated #3239; there is noCloses/Fixes/Resolveskeyword anywhere in the body (grep exit 1). All five changed files are in scope; the only new public surface is the documentedprovider_manifestaccessor and the documentedrequires_newer_runtime. The PGO-11 rewrite (tests/panel_generation_ownership.rs:93-106) matches the tree in what it says about the live path. Caveat, folded into check 2: the note calls the restore edge "the homed half", but the step never receives records in production, so the body's "this PR closes only row 13" is stronger than the tree supports.
Commands run (all with --offline, CARGO_TARGET_DIR=/home/fuyu/.hermes/cache/scratch/review-3242/target):
cargo +1.85 check -p bitty-runtime --tests --offline→Finished dev profile(exit 0)cargo clippy -p bitty-runtime --all-targets --offline -- -D warnings→ exit 0, no diagnosticscargo test -p bitty-runtime --offline --test panel_restore_path→9 passed; 0 failedcargo test -p bitty-runtime --offline --lib -- registry::provider::tests→7 passed; 0 failedRUSTDOCFLAGS="-D warnings" cargo doc -p bitty-runtime --no-deps --offline→ exit 0- sabotage 1 (
forced false) →1 passed; 1 failed(new row,Bound/left: 1, right: 0) - sabotage 2 (
forced true) →7 passed; 2 failed(control + pre-existing first-bind row) - sabotage 3 (
parsereverted) → lib6 passed; 1 failed,panel_restore_path8 passed; 1 failed grep -rn "set_panel_restore_records\|register_panel_provider" --include=*.rs crates→ definitions only, no non-test callersgh pr diff 3242reviewed against worktree HEAD195be5b7(clean)
Requested change: give the row a consuming path before claiming it closed — either a non-test caller of register_panel_provider plus a non-test producer of PanelRestoreInput (e.g. decode_manifest/plan_restore at startup), or retitle the PR as the seam-only change it is and keep row 13 open. Everything else in the diff is correct and fail-closed as described.
…the runtime (bitty#3239 row 13 seam)
`PlaceholderReason::Incompatible` had no producer. `PanelEdgeRelease.reason`
was only ever `unloaded`/`disabled`/`reloaded`/`crashed`, and the one versioned
provider record, `PanelProviderManifest`, refused every schema other than 1 at
`parse`, so the skew could not be expressed at all: a panel whose provider
speaks a newer contract than this runtime was indistinguishable from a panel
whose provider is not installed, and the placeholder vocabulary was reachable
only from tests that constructed the reason token by hand.
The provider gate now admits a manifest above `PROVIDER_MANIFEST_VERSION_V1`
and `PanelProviderManifest::requires_newer_runtime` names what was admitted, so
the declaration survives as a registered record instead of being deleted at the
gate. Registration is still not a bind: `PanelRuntime::provider_manifest` is the
read-only accessor the bind edge needs to observe it. No code applies a manifest
payload, so admitting a newer schema cannot make a newer contract commit
anywhere.
The gate sits on the restore edge (`Runtime::restore_one_panel`). A record whose
driver answers `Installed` but whose registered provider manifest requires a
newer runtime does not first-bind: `provider_contract_outruns_runtime` refuses
the bind, the fresh container is retained, and
`present_placeholder(.., "incompatible")` writes the Core-owned placeholder. No
grant, no controller generation, no mount, no layout or focus op: the container
keeps exactly the allocation epoch it was created with. A driver that registered
no provider manifest, or one at the schema this runtime reads, binds unchanged.
Scope, stated rather than implied: this is the rule and its seam, not a shipped
producer, so bitty#3239 row 13 stays open. Both inputs of the gate are
test-only — `Runtime::set_panel_restore_records` and
`PanelRuntime::register_panel_provider` have no caller outside
`crates/bitty-runtime/tests/`, nothing encodes or decodes a restart manifest on
the session save/load path, the plugin manifest grammar carries no provider
declaration to register, and the shipped restore runs before the panel host
exists. The module's reachability note, the `provider_manifest` /
`register_panel_provider` docs, the `PROVIDER_MANIFEST_VERSION_V1` doc and the
PGO-11 note say exactly that; a scoped follow-up issue names the missing call
sites.
Test discrimination (each row, and the production line that turns it red when
reverted):
* `registry::provider::tests::a_newer_manifest_is_admitted_and_declares_it_needs_a_newer_runtime`
(lib) -- red when `PanelProviderManifest::parse` goes back to
`version != PROVIDER_MANIFEST_VERSION_V1`, because the v2 manifest never
exists to register.
* `tests/panel_restore_path.rs::a_provider_manifest_newer_than_the_runtime_keeps_the_container_with_an_incompatible_placeholder`
-- red when the `provider_contract_outruns_runtime` branch of the
`PanelDriverAnswer::Installed` arm in `Runtime::restore_one_panel` is reverted
to bind unconditionally (observed: `Bound { grants: {"panel.create",
"panel.focus"} }` and no placeholder).
* `tests/panel_restore_path.rs::a_provider_manifest_at_the_supported_schema_still_first_binds`
-- the control for the same line: red if the gate refuses every registered
provider instead of comparing `version()` (observed: over-broad gate turns it
and the pre-existing first-bind row red).
Sabotage runs for the two code lines above were executed and reverted; the
failing output is quoted in the PR body.
Also corrected the test-harness record that claimed the gap: the PGO-11 note in
`tests/panel_generation_ownership.rs` now states the restore edge's rule, the
three reasons it is not yet reachable in a shipped binary, and which direction
remains unmeasured (no `bitty.panel.create`/rebind path reads a provider
manifest, and the persisted record carries identity, not provider content).
Rebased onto `f78e887d`; the conflict in `panel_restore.rs` was additive
(this gate's helper next to `restored_slot_of`), and the new control row was
adapted to the `RestoredPanel::restored_id` removal.
|
Answering review id 5956514226 (CHANGES-REQUESTED), and the rebase conflict in one pass. Outcome: the review's finding is accepted, not argued away. This PR is Why wiring was not taken (with the checks)You proved the two producers are test-only. I re-derived each from the tree at the rebased head, and each one needs a decision or a subsystem that is not in this PR's scope:
What changed in response
Rebase onto
|
Xuepoo
left a comment
There was a problem hiding this comment.
Independent re-review lane (guard-dispatched) — head 35f66a3, supersedes review 5956514226
Re-reviewed at 35f66a36c73660e42fa596d0b87c44c2fea0a577 (merge of 195be5b7 + f78e887d; merge-base with origin/main is f78e887d). Every claim was checked against the tree, not the description. All six checks PASS — APPROVE.
1. Rebase/merge resolution keeps both sides — PASS
#3241's symbols are all present at head:fn restored_slot_of(crates/bitty-runtime/src/runtime/panel_restore.rs:570) and its call site:400(slot: restored_slot_of(record.key.workspace.get(), restored_slots)),fn release_panels_of_outgoing_world:427with its callcrates/bitty-runtime/src/runtime/session.rs:1338,attributed_workspace_countcrates/bitty-runtime/src/registry/panel.rs:2746.- The gate is inside the
PanelDriverAnswer::Installedarm and nowhere else:panel_restore.rs:514-530(if provider_contract_outruns_runtime(&host, owner) { present_restored_placeholder(.., "incompatible") } else { bind_restored_panel(..) }).Missing/Denied/Olderarms are byte-unchanged. - No revert of
#3241:git diff 35f66a36 origin/maintouches only the PR's own five files (28 ins / 348 del), and for each of them the reverse diff's removed lines are exactly the PR's added lines — sorted-line-setdiffis empty forpanel_restore.rs(98/98),panel_restore_path.rs(130/130),host.rs(23/23),provider.rs(78/78),panel_generation_ownership.rs(19/19). Zero removed lines match the three#3241symbols. So the merge shape altered no content: head == main + this patch.
2. Breakage claim — PASS
RestoredPanel::restored_idis gone fromorigin/main(git grep restored_id origin/main→ 0 hits); it existed at335d3d0d:crates/bitty-runtime/src/runtime/panel_restore.rs:231and at the pre-merge lane head195be5b7:245, which called it at195be5b7:crates/bitty-runtime/tests/panel_restore_path.rs:499. The auto-merge would indeed have carried that call into a tree without the API.- The row now reads the container id from the outcome:
panel_restore_path.rs:475let PanelRestoreOutcome::Bound { panel, .. } = report.panels()[0].outcome;—Bound'spanelfield is the "freshly minted container id" (panel_restore.rs:249). No resurrection ofrestored_id.
3. Honesty of the downgrade — PASS
- Title: "… — seam only (bitty#3239 row 13 stays open, implemented-only/unwired)". Body opens with
**Status: implemented-only (unwired)and "Row 13 remains open.";closingIssuesReferencesis[](no closing keyword). - Grep of every added line in the diff for
closes|closed|fixes|resolves|now produces|now presents|is closed→ the only hit is the negation atpanel_restore.rs:60("a seam, not a shipped producer"). - Every
row 13mention in the touched files either points at the follow-up or explicitly says the row is open:registry/host.rs:1162,:1207("row 13 stays open"),registry/provider.rs:59-63("nothing outsidecrates/bitty-runtime/tests/registers a manifest"),panel_restore.rs:44-80(module reachability note naming all three missing producers),:594("constantfalsein a shipped binary today"). PGO-11 note attests/panel_generation_ownership.rs:93-105is rewritten to "implemented on the restore edge but not reachable in a shipped binary, so this row remains open". No surviving over-claim.
4. Three-reason rejection of wiring is accurate — PASS
- (a)
crates/bitty-ui/src/panel_persist.rs:267-274:PersistedPanel { id, key, title }only — no panel type, no owning plugin, no driver answer;PanelRestoreInput::new(record, PanelType, PanelDriverAnswer)(panel_restore.rs:199). Adding those fields movesPERSIST_MANIFEST_VERSION(currently2,panel_persist.rs:55). Accurate. - (b)
crates/bitty-runtime/src/plugin_runtime/manifest_toml.rs:243admits onlyplugin | compat | capabilities | lazy | limits | dependencies;panel.providerappears only as a capability token (crates/bitty-package/src/manifest.rs:416,crates/bitty-plugin-host/src/capability.rs:214).register_panel_provider(registry/host.rs:1168) has three callers, all test-side:tests/cw_contracts.rs:172,tests/cw_integrate.rs:192,tests/panel_restore_path.rs:586. Accurate. - (c)
crates/bitty-terminal/src/main.rs:1186runsruntime.restore_session_on_startup(args.safe);:1241isplugin_runtime::discover_and_activate(..), which constructs the host atplugin_runtime.rs:1909(PanelRuntime::new), installed atterminal_app.rs:1944(install_shared_scene_host, insidewith_panel_scene_hoststarting:1939). Restore genuinely precedes host construction and installation, soNoPanelHostfor every record. Accurate — the downgrade was not premature.
5. Follow-ups are executable, not vague — PASS
- Issue #3243 (open,
P1+area:runtime) names the exact call sites:set_panel_restore_records(panel_restore.rs:358, no caller outside tests), empty seeds (runtime.rs:2589,:2927), save-sideencode_manifestmissing (session.rs:1676), load-sidedecode_manifest/apply_session_snapshotmissing (session.rs:1732/:1255),commit_panel_restore(:1473),register_panel_provider(host.rs:1168), the missing manifest grammar field, and the startup order (main.rs:1186vs:1241→plugin_runtime.rs:1909→terminal_app.rs:1944). Spot-checked line numbers are correct at head. - Its Closing condition is concrete and falsifiable: one production chain (save → manifest on disk → load in a fresh process → provider above
PROVIDER_MANIFEST_VERSION_V1→incompatible, epoch kept, no controller, no grant), with each producer's removal reddening that row or its control. - The #3239 comment (2026-11-18T12:51:36Z) separates "What landed" (rule, accessor, gate, three rows, sabotage re-runs) from "What did not land — and why row 13 stays open" (all three blockers) and states the acceptance condition is not met.
6. Gates on the new head — PASS (observed exit codes, scratch copy at git archive 35f66a36)
cargo fmt --all --check exit 0
cargo clippy -p bitty-runtime -p bitty-ui --all-targets --offline -- -D warnings
exit 0
cargo +1.85 check -p bitty-runtime --tests --offline exit 0
cargo test -p bitty-runtime --offline --lib exit 0 (1694 passed; 0 failed)
cargo test -p bitty-runtime --offline --test panel_restore_path
exit 0 (11 passed; 0 failed)
cargo test -p bitty-runtime --offline --test panel_generation_ownership
exit 0 (19 passed; 0 failed)
Sabotage runs, executed on my own scratch copy and reverted there (the quote in the PR body reproduces):
provider_contract_outruns_runtimeforcedfalse→ exit 101,10 passed; 1 failed, onlya_provider_manifest_newer_than_the_runtime_keeps_the_container_with_an_incompatible_placeholder(panel_restore_path.rs:509,left: 1 / right: 0, outcomeBound { panel: PanelId(1), workspace: WorkspaceId(2), grants: {"panel.create","panel.focus"} }).- Forced
true→ exit 101,8 passed; 3 failed:a_provider_manifest_at_the_supported_schema_still_first_binds,a_second_restore_releases_containers_attributed_to_the_replaced_world(#3241's row),a_session_restore_mints_a_fresh_panel_id_and_first_binds_the_installed_driver. parsereverted toversion != PROVIDER_MANIFEST_VERSION_V1→ lib6 passed; 1 failed(UnsupportedVersion { version: 2 }atprovider.rs:460),panel_restore_path10 passed; 1 failed(panel_restore_path.rs:584).
So both directions of the gate are pinned by a row, and the merge of #3241 did not blunt either of them.
Residuals (non-blocking, already tracked)
- Row 13 stays open and cannot be closed by this PR:
ProviderReason::Incompatiblestill has no shipped producer. #3243 is the correct home; the PR's own title and body say so. - I could not verify the "byte-identical tree to the local rebase" claim directly (no local rebase ref to diff), but the equivalent property holds and is what matters: head content ==
origin/maincontent + this patch, line for line, in all five files.
Verdict: APPROVE. The change is honest about being a seam, the rebase kept both sides' semantics, the removal of restored_id was correctly handled rather than papered over, and the follow-up is executable.
Related #3239 (row 13 stays open). Follow-up: #3243.
What was missing (bitty#3239 row 13)
PlaceholderReason::Incompatibleexisted but had no producer.PanelEdgeRelease.reasonwas only everunloaded/disabled/reloaded/crashed(dispose_inner,reload, crash), andPanelRegistry::present_placeholdertakes the token from its caller, so nothing in production namedincompatible.PanelProviderManifest, refused every schema!= 1atparse(ProviderContractError::UnsupportedVersion), so the skew could not even be expressed: a panel whose provider speaks a newer contract was indistinguishable from a panel whose provider is not installed.panel.rs,present_placeholder(.., "incompatible")).What this does
The gate admits the skew (
registry/provider.rs).PanelProviderManifest::parsenow admits any version>= 1and refuses only0(which is not a schema version at all, stillUnsupportedVersion). A manifest abovePROVIDER_MANIFEST_VERSION_V1reportsrequires_newer_runtime(). Registration is unchanged and keeps the record: dropping a too-new manifest at the gate would delete the only evidence a bind could observe, and would resurface asunloadedfor a provider that is installed. No code applies a manifest payload, so the wider admission cannot make a newer contract commit anywhere.The bind edge observes it (
registry/host.rs,runtime/panel_restore.rs).PanelRuntime::provider_manifest(owner)is the read-only accessor.Runtime::restore_one_panel— the session-restore step from #3240 — refuses the first bind when the driver's registered manifest requires a newer runtime:Fail-closed: the container allocated for the record is retained,
present_restored_placeholderwrites the Core-ownedincompatibleplaceholder, and nothing else happens — no controller generation, no grant (panel.create/panel.focusstay ungranted on the allocation epoch), no mount, no layout or focus op, no registry mutation beyond the placeholder and its bounded recovery record. The record outcome isPanelRestoreOutcome::Placeholder { reason: Incompatible }, notDropped, so the container is not disposed.Precedence is deliberate: the skew gate applies only to an
Installedanswer.MissingandDeniedkeep their more specific reasons.Why this is
implemented-only (unwired)— review finding, answeredReview id 5956514226 proved the call chain is real (
load_session_from_path→apply_session_snapshot→commit_panel_restore→restore_one_panel→ this gate) but that both preconditions are test-only:Runtime::set_panel_restore_records(runtime/panel_restore.rs:358)crates/bitty-runtime/tests/panel_restore_inputsis seededVec::new()(runtime.rs:2589,:2927); nothing callsbitty_ui::encode_manifeston save ordecode_manifest/plan_restoreon loadPanelRuntime::register_panel_provider(registry/host.rs:1168)crates/bitty-runtime/tests/panel.provideris a capability token only; the plugin manifest grammar (plugin_runtime/manifest_toml.rs) admits no provider-contract field, so no activation point could register oneHence
provider_manifest(owner)answersNonein a shipped binary andprovider_contract_outruns_runtime(panel_restore.rs:595) is constantfalse.I did not wire it here, and the reason is scope, not effort: a real producer needs (a) a panel type + owning plugin on the persisted record, which is
RFC-OQ-9's pending field set and aPERSIST_MANIFEST_VERSIONbump (row 16 is open); (b) a provider-contract declaration in the plugin package manifest plus its parser; (c) a production mapping from plugin toPanelDriverAnswer, which does not exist; and (d) a startup order where a panel host exists at restore time —crates/bitty-terminal/src/main.rs:1186restores beforediscover_and_activate(:1241) constructs the host, whichterminal_app.rs:1944installs, so a production restore drops every record asNoPanelHosttoday. Inventing a parallel path for that would be exactly the kind of unreachable wiring this review objected to. All three gaps, with symbols, are in #3243.What this PR therefore claims, and no more: the rule exists, is fail-closed, and is proven on the restore chain; the seam is documented as unreachable at the symbol (
panel_restoremodule note,provider_manifest,register_panel_provider,PROVIDER_MANIFEST_VERSION_V1, PGO-11 note) so the next reader cannot mistake it for a shipped producer.Which production line each new test discriminates
registry::provider::tests::a_newer_manifest_is_admitted_and_declares_it_needs_a_newer_runtime(lib)PanelProviderManifest::parse,if version == 0back toif version != PROVIDER_MANIFEST_VERSION_V1tests/panel_restore_path.rs::a_provider_manifest_newer_than_the_runtime_keeps_the_container_with_an_incompatible_placeholderprovider_contract_outruns_runtimebranch of thePanelDriverAnswer::Installedarm inRuntime::restore_one_panel(bind unconditionally)tests/panel_restore_path.rs::a_provider_manifest_at_the_supported_schema_still_first_bindsversion()The restore row asserts the placeholder through three surfaces (
PanelRestoreOutcome,unbound_container_records().placeholder(), and the built placeholder block), that the container is retained in the record's workspace withPanelState::Createdand no controller, and that no capability of the refused driver's resolution is granted.Sabotage runs (executed on the rebased head, then reverted)
provider_contract_outruns_runtimeforced tofalse:provider_contract_outruns_runtimeforced totrue:parsereverted toversion != PROVIDER_MANIFEST_VERSION_V1:Rebase onto
f78e887d(#3241)origin/mainhad advanced tof78e887d, which rewrote the same panel-restore step (#3241: ordinal-based slot resolution, outgoing-world release, dead public API removal). Both sides' semantics are kept:panel_restore.rsconflict was purely additive in the helper block:restored_slot_of(main, ordinal → slot) andprovider_contract_outruns_runtime(this PR) both remain, each with its own doc.RestoredPanel::restored_id, which fix(runtime): resolve the #3240 panel-restore residuals (multi-workspace slots, released world, tautological rows, dead API) #3241 removed as dead public API; it now reads the container id out ofPanelRestoreOutcome::Bound, like the rest of the file.restore_one_panelkeeps main'sslot/workspacesresolution and therelease_panels_of_outgoing_worldordering; the skew gate sits inside the unchangedInstalledarm.Scope
bitty.panel.create/rebindpath reads a provider manifest, so a generation that binds outside a restore still commits its own resolution.Cargo.lockchange.Gates (run on the pushed head)