Skip to content

Replace hostile-writer shell scaffold with typed host effect - #9363

Merged
briansrls merged 6 commits into
mainfrom
session/neat-tern-474
Aug 27, 2026
Merged

briansrls merged 6 commits into
mainfrom
session/neat-tern-474

Conversation

@briansrls

@briansrls briansrls commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is the operator-directed dissolution of the population admitted in #9341, not a claim that its merge was unauthorized. It:

  • removes the hostile-writer hand-shell scaffold exactly
  • models ProbeToolchainHomeInterference as a typed runner-local HostEffect and realizes it through host_effect_apply
  • executes that modeled discriminator in both witness-floor jobs after the compiler build
  • represents the foreign executor as RunnerLocalHost instead of fabricating a fleet ComputeHost

The three older unbound_dissolution rows still in ci_workflow_run_emit.dag (toolchain_home_isolation, pin_rustup_default, and native_cache_root) predate #9341 and are outside this dissolution.

v1 seed admission

This change touches v1_interpreter.rs, v1_compiler_infer_method.rs, v1_interpreter_dispatch_generated.rs, and 04_method.dag. The v1 seed remains frozen for growth. This change is admitted by the PURPOSE test in gunbc.v1_maintenance_standing.v1_seed_standing: it serves the v2 self-host program by providing the native realization required for a typed v2 host_effect_apply arm, allowing the rejected shell scaffold to be deleted. It adds no v1 capability for v1's own sake; v1 is the shrinking bootstrap realization beneath the modeled v2 effect.

Net hand-Rust receipt

Measured with git diff --numstat origin/main...HEAD -- '*.rs', the Rust delta is +172/-0 LOC: +164 in the hand-maintained existing file v1_interpreter.rs, plus +5 in the generated v1_compiler_infer_method.rs mirror and +3 in the generated interpreter-dispatch mirror. Therefore the net hand-Rust surface is larger by 164 LOC, in zero new Rust files.

The hand-maintained declaration delta is four functions, all in v1_interpreter.rs: two projections that construct the modeled result/refusal values, the builtin realization, and its nested concurrent fixture arm. The existing builtin dispatch gains one modeled-roster arm. Each exists solely to make the typed v2 host effect executable; none adds a v1-facing feature. The deleted scaffold is 170 lines of .dag/generated workflow shell, so it is real shell-to-intent migration but not a net-negative hand-Rust claim—the currencies are reported separately.

State-space repair

The result type deliberately keeps four named refusal states:

  • ToolchainPrivateHomeBindingMissing: harness configuration is absent or wrong
  • ToolchainSharedArmDidNotObserveInterference: the positive control did not demonstrate interference
  • ToolchainPrivateHomeIsolationBreached: the defect the discriminator exists to detect
  • ToolchainInterferenceFixtureFailed: the fixture itself could not execute

This is a state-space fix, not message wording. In particular, missing CARGO_HOME binding and a real isolation breach require opposite remedies and must not share one status symbol again.

Verification

  • cargo fmt --all --check (pre-commit and pre-push)
  • cargo check -p v1-compiler --bin gunbc
  • restored source executes successfully with CARGO_HOME=$RUNNER_TEMP/cargo
  • wrong-binding control returns ToolchainPrivateHomeBindingMissing

The interference arms were mutated and restored one at a time:

  1. Shared arm only: changed the hostile replacement from /bin/false to /bin/true; the probe failed alone with ToolchainSharedArmDidNotObserveInterference. Restored /bin/false before the next mutation.
  2. Private arm only: pointed the hostile writer at the private reader home; the probe failed alone with ToolchainPrivateHomeIsolationBreached. Restored the separate legacy path afterward.
  3. The restored source returned to the full successful discriminator, with neither mutation left in the pushed tree.

@gunbai-bot gunbai-bot Bot changed the title gunbc#9341 merged its hand-shell scaffold 20 min BEFORE the operator declined it, and its author session is gone: remove the unbound-dissolution scaffold from main via the modeled path, and repair the two defects review 56337 found beside it Replace hostile-writer shell scaffold with typed host effect Aug 26, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 26, 2026 22:11
@gunbai-bot

gunbai-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixed the fail-closed transport defect identified by review 56394 in commit 5de90f8.

ToolchainHomeInterferenceProbeOnHost now folds the full HostEffectTransport coproduct. Only LocalShell reaches the local builtin; SshShell, FleetSsh, and EmitArtifactThenThinRun each return NotConverged with a transport-specific reason while preserving the requested intent in applied.

I also added an executing witness using SshShell that requires the explicit requires LocalShell on RunnerLocalHost refusal. This distinguishes refusal at the transport boundary from accidentally executing the builtin and merely failing later because the CI binding is absent.

— sent from neat-tern-474

@briansrls
briansrls merged commit 80e7e3d into main Aug 27, 2026
3 checks passed
@briansrls
briansrls deleted the session/neat-tern-474 branch August 27, 2026 01:12
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.

1 participant