Repository navigation
shell→dag §5.A/§5.B: dissolve hostname-short read into typed os.Hostname.ReadShort op - #7171
Merged
Merged
Conversation
Dissolve the HostIdentityShortHostnameRead + ci_deploy_target_host "hostname -s 2>/dev/null || hostname" concats into a cited typed op (extdeps.os.hostname.ReadShort) realized via a typed cell + typed argv. The || hostname absorbing fallback becomes a modeled exit outcome. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls
added a commit
that referenced
this pull request
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
shell→dag §5.A/§5.B: dissolve the hostname-short read into a typed op
Continues the shell→dag arc (census
docs/plans/shell-to-dag-residual-census-and-arc-completion.md) following the merged exemplar #7064. Adds the first of the census §5.A new ops and dissolves both runtime-presenthostname -sread consumers — the concat is deleted, not relocated (the regression #7004/#7006 warned about).What lands
dag/extdeps/os/hostname.dag— citedservice os.Hostnameoperation ReadShort(["hostname","-s"],readonly,mock_response). The old"hostname -s 2>/dev/null || hostname"absorbing fallback (§5 — silently substitutes the FQDN when-sfails, conflating short vs long) becomes a typed exit outcome:nonzero => refuse, never re-appended.dag/gunbc/hostname_read.dag— typed reader mirroring the mergedsystemctl_show_read:LocalShell→ the typed op;SshShell→ typed argv throughtyped_argv_exec(not a joined string);EmitArtifactThenThinRun→ none. Plus an argv-matches-authority consistency fn.host_effect_realize.dag— new typed cellHostnameReadOnHost;HostIdentityShortHostnameReadnow resolves to it instead ofShellOnHost { script };realize_hostname_read_on_hostgroundsShellEffectApplied. All three total folds (apply,apply_gated,not_converged_directive) get the arm — fail-closed by construction.dag/gunbc/host_identity_observation_script.dag(the concat + its scaffold).ci_deploy_target_host.dag— the runtime-presentdeploy_target_host_observed_hostname()reads through the typed op. The GHA preflight block (foreign-executorrun:) legitimately stays shell (category E — bounded roster).Green by execution (hermetic)
PASS host_identity_observation_holds— newwitness_hostname_read_argv_is_typed_not_concat(materialized argv ==hostname -s, matches authority),witness_hostname_read_resolves_typed_cell_not_shell_script(the discriminating RED: resolve →HostnameReadOnHost, notShellOnHost— goes red on any revert to a string sink), andwitness_host_effect_apply_hostname_read_converges(end-to-end via the mock).PASS ci_deploy_target_host_witnesses— newwitness_observed_hostname_reads_typed_op_hermetic.The string-pinning
witness_hostname_script_is_modeled_constant(which enshrined the concat as the contract — the anti-pattern the census flags) is replaced.Scope / not in this PR
os.Hostname.SetHostname+ theSetHostnameCashost_effect_set_hostname_cas_scriptconcat (§4.A2 model-first) — a follow-up reusing this op file.program.dag/serialize_bashratchet untouched (this touches no bash-AST vocab).🤖 Generated with Claude Code