Skip to content

fix(setup): preserve unrelated Hermes YAML line formatting - #1754

Merged
N0zoM1z0 merged 1 commit into
morluto:mainfrom
zaydiscold:fix/hermes-preserve-yaml-lines
Oct 11, 2026
Merged

N0zoM1z0 merged 1 commit into
morluto:mainfrom
zaydiscold:fix/hermes-preserve-yaml-lines

Conversation

@zaydiscold

Copy link
Copy Markdown
Contributor

When REA updates or removes its Hermes MCP entry, the YAML serializer uses its default line width and rewraps unrelated long values, including user prompts. Disable that wrapping for existing documents so the change stays confined to the REA registration.

The regression test writes a long personality value, runs the production setup and uninstall paths, and checks that the original line survives setup and the complete original file is restored after uninstall. The test fails on current main and passes with this change.

Validation on macOS ARM64:

  • Hermes and OMP client suites: 10 tests passed.
  • npm run check:fast: typecheck and lint passed.
  • npm run build:cached: passed.
  • Personal installation verification: REA 6.4.0 doctor reports Claude Code, Codex, Hermes, OMP and Ghidra healthy; Hermes discovers 170 tools; OMP exposes REA in its running tool catalog; a compiled ARM64 smoke target was analyzed through Ghidra.

Follow-up to #1403. This does not change configuration values or MCP registration fields.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 989e0fb8a8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

else yamlDocument.setIn([serversKey, PRODUCT_IDENTITY.mcpServerKey], entry);
return yamlDocument.toString();
// Editing REA must not reflow unrelated user prompts or other YAML scalars.
return yamlDocument.toString({ lineWidth: 0 });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve pre-wrapped unrelated YAML scalars

For an existing Hermes file whose long plain scalar is already split at YAML's normal 80-column boundary, lineWidth: 0 disables folding for every node, so adding or removing mcp_servers.rea joins that unrelated value onto a single physical line. Such a file was stable under the previous default serializer, so this replaces the one-line reflow bug with the inverse regression; preserve source layout for untouched nodes (or scope the no-wrap behavior to the inserted REA node) instead of setting a document-wide option.

AGENTS.md reference: AGENTS.md:L9-L9

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T07:39:24.884974Z 989e0fb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@N0zoM1z0 N0zoM1z0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced the reported setup reflow on freshly built latest main e5699d23: the contributor regression fails exactly on the unchanged long YAML scalar, while five controls pass. After independent review, freshly compiled exact head 989e0fb8 passes all six production-boundary Hermes tests, including parsed configuration preservation, comments, idempotent registration and uninstall recovery. All 31 exact-head CI checks are successful. The existing-document emitter change is narrowly scoped; no unrelated software installation or real user configuration is involved. Original contributor commit/credit is preserved. The uninstall exact-text test covers recovery; it is not an independent claim about every YAML deletion serialization shape.

@N0zoM1z0
N0zoM1z0 merged commit 58e91e1 into morluto:main Oct 11, 2026
31 checks passed
@morluto morluto mentioned this pull request Oct 13, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: setup Setup, packaging, upgrade, install, Doctor, and client registration labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants