Repository navigation
Preserve credential files during MCP sync - #289
Merged
Eli Pinkerton (wallstop) merged 1 commit intoOct 18, 2026
Merged
Eli Pinkerton (wallstop) merged 1 commit into
Eli Pinkerton (wallstop) merged 1 commit into
Conversation
Alias updates currently discard the credential file BOM. Move GitHub and Z.ai alias synchronization to typed Python, preserving precedence, divergence detection, dry runs, literal values, BOM, and line endings. Write atomically with private permissions and emit statuses only. Keep authentication probing in the doctor. Validation: all 43 harness files; seven new alias cases on Python 3.9.25; strict pyright on four changed Python files; fast and full gates; npm payload unchanged at 181 files and 180528 bytes. Unity host passed 393 EditMode and 15 PlayMode tests. No live credential repair was performed. Revert this commit to restore the Node alias writer. Refs #171.
Eli Pinkerton (wallstop)
force-pushed
the
migrate/mcp-credential-aliases
branch
from
October 18, 2026 05:59
7fa2868 to
a76ffdb
Compare
Eli Pinkerton (wallstop)
changed the base branch from
main
to
migrate/mcp-json-writers
October 18, 2026 05:59
Eli Pinkerton (wallstop)
added this pull request to stack #291
October 18, 2026 05:59
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.
DISCLOSURE: LLM-GENERATED TEXT
Why: Alias synchronization drops the credential file's BOM.
What:
Refs #171.
Note
Medium Risk
Changes how
.env.localand MCP client configs are read/written across devcontainer shells andmcp:sync, including credential alias mirroring; mistakes could break auth or corrupt local configs, though behavior is heavily contract-tested.Overview
Moves MCP sync file writes and credential alias logic out of inline Node/bash into typed Python helpers invoked by
configure.mjs(aliases, JSON frontends, Codex TOML) and addsscripts/unity_mcp_settings.pyfor Unity bridge startup settings used byunity-mcp-host.mjs..env.localloading is reworked:env-local.shdelegates parsing toenv_local.pyvia uv/Python with a NUL-delimited protocol so exports apply atomically and values stay literal (no shell injection). Existing precedence (DATAVIZ_ENV_LOCAL_PRECEDENCE=filefor MCP credential keys) is preserved.Credential alias sync (
mcp_aliases.py) now updates.env.localthroughwrite_private/write_atomic, keeping BOM, line endings, and divergent-pair detection while emitting statuses only (no secret values in output).npm run mcp:syncreports per-frontend failures and sets a non-zero exit when any writer fails, while other frontends can still run; JSON persistence is batched once per sync. Docs and harness scope map the new scripts to contract tests.Reviewed by Cursor Bugbot for commit a76ffdb. Bugbot is set up for automated code reviews on this repo. Configure here.