daemon: scrub stale keymap-command origin variables from every base #226
No reviewers
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis!226
Loading…
Reference in a new issue
No description provided.
Delete branch "daemon/origin-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The keymap-command origin variables (
FELIS_ORIGIN_SESSION_ID,FELIS_HOST,FELIS_CWD, and the viewport anchors) were only ever added, never removed. A felis window launched from aruncommand therefore kept that chord's values in its own environment and passed them on to its later chords and new sessions. A local window opened from a--hostwindow kept reporting the remote host, so a script that branches onFELIS_HOSTdialed the wrong daemon.The daemon now removes them in
apply_env_policy, next to the denylist. Every create passes through that function whatever its base: the client's snapshot, the relay carrier's environment, or the daemon's own birth environment. That covers asystemd-runhand-off and the fallback used when a snapshot is over its caps. Unlike the denylist, these keys are not reserved, soSpawnArgs.envstill sets the current chord's values after the scrub.felis-client-coreexposes the full set asORIGIN_ENV_KEYS, and a daemon test keeps the two lists equal. No wire or config change; this is a patch-release fix.Closes #223.
Verification
SpawnArgs.envvalues for all six arrive exactly;just checkminus the test step passes (fmt, lint, portable, prose, skills, docs links, deny, publish dry run, proto-compat, tool tests), and so doesjust check-windows.cargo nextest run --workspace --all-featuresshows three failures, none from this change:felis-render-wgpurow_cache golden failures reproduce on cleanmain;cli_bridge::tests::a_daemon_write_failure_fails_and_clears_the_linkhangs on cleanmaintoo;an_idle_notification_subscriber_does_not_block_the_upgradetimed out under full-suite load but passes on its own.