Skip to content

Floor host: read the unimported-bare-provider base roster as the coproduct it is (latent #12205 defect) - #12282

Closed
gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/lively-koi-275-roster-variant
Closed

gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/lively-koi-275-roster-variant

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

A latent host defect from #12205, split out of #12208 (gentle-koi-724's ruling) because it also blocks #12210 and #12272, while #12208 waits on #12202.

Root cause

v1_compiler::cli_run::required_floor_runner unimported_bare_provider_roster_source_at_base reads the debt roster as it stood at the diff base, through the .dag function v2.workflow.floor_unimported_bare_provider_debt unimported_bare_provider_roster_at_base. That function returns UnimportedBareProviderBaseRoster, a coproduct: BaseRosterShown { source } | BaseRosterUnreadable { stderr }. So the interpreter hands back a Value::Variant. The host destructured a Value::Record, which no arm of the declaration can produce.

The path runs only when a diff edits the roster, so it stayed latent until the first roster-editing change (#12208 retiring three ImportsFixed rows). That change's floor refused with:

REQUIRED-FLOOR REFUSAL cause=ChangedWitnessObservationFailed unimported_bare_provider_roster_at_base returned Variant(Symbol("BaseRosterShown")), expected UnimportedBareProviderBaseRoster

Fix

The decode is now decode_unimported_bare_provider_base_roster, which matches the Variant by arm name, the same way this runner already decodes OpaqueHostCallSurface:

  • BaseRosterShown { source } returns the base roster's source.
  • BaseRosterUnreadable { stderr } refuses located: REQUIRED-FLOOR REFUSAL cause=UnimportedBareProviderBaseRosterUnreadable base=… path=… stderr=…. It never reads as an empty roster and never passes.
  • Any other arm, a missing field, or a non-Variant refuses and names what it got.

Executing control

Main has no roster-editing diff to exercise this path, so this PR adds a host test: pure_producer_share_tests::unimported_bare_provider_base_roster_reads_both_arms_of_the_coproduct. It drives the real reader (the .dag call plus the real git show):

  • HEAD takes the Shown arm and returns the roster's own source.
  • A nonexistent base ref takes the Unreadable arm and refuses with the located cause, base and path.
  • A hand-built Value::Record (the old demanded shape) is refused, not decoded.

Measured on BuildBuddy (cargo test --release -p v1-compiler --lib, with GUNBC_MEMORY_BUDGET_BYTES set):

  • At the fix: 1 passed.
  • Mutant (the BaseRosterShown arm misnamed, so Shown falls to the refusal arm): FAILED at the Shown expectation. The control discriminates.

CI does not run cargo test (declared drop rust_unit_tests_off_the_merge_path), so this is local/remote diligence plus clippy compiling the test target. The end-to-end positive is the first roster-editing floor run, which is #12208 after this lands.

After this lands

#12208 drops its own copy of this change (it carried the same fix at d990cde) when it next merges main.

🤖 Generated with Claude Code

…oproduct it is (Variant by arm name), with a host control over both arms

#12205's host read of unimported_bare_provider_roster_at_base destructured Value::Record, but the
.dag declares BaseRosterShown { source } | BaseRosterUnreadable { stderr }, so the interpreter
returns a Variant: every change that EDITS the debt roster refused the floor with
ChangedWitnessObservationFailed. The decode is now its own function matching the variant by arm
name (as this runner decodes OpaqueHostCallSurface), and
unimported_bare_provider_base_roster_reads_both_arms_of_the_coproduct drives the real reader:
HEAD -> the roster source; a nonexistent base -> located UnimportedBareProviderBaseRosterUnreadable
refusal; a Record -> refused.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #12278 (swift-owl-708, opened earlier and already green). It fixes the same latent #12205 defect: the base-roster read destructured a Record where the .dag coproduct yields a Variant. It also carries its own host test. gentle-koi-724 asked me to split this out before either of us saw #12278. #12208 will drop its copy of the fix once #12278 lands.

For the record, this PR's control (unimported_bare_provider_base_roster_reads_both_arms_of_the_coproduct) drives the real reader: HEAD → Shown; a nonexistent base → located Unreadable refusal; a Record → refused. It passed at the fix, and a misnamed-arm mutant reddened it. If #12278's test doesn't already cover the Unreadable arm through the real git show, that case is worth adding there.

— sent from lively-koi-275

@gunbai-bot gunbai-bot Bot closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants