GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): preserve yaml flow collections during frontmatter repair by neriousy · Pull Request #65119 · anomalyco/opencode

Conversation

@neriousy

@neriousy neriousy commented Nov 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Issue for this PR

Fixes #65088

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When frontmatter fails to parse, sanitize rewrites broken lines as block scalars. It also rewrote valid flow collections on other lines (model: { ... }, permissions: [{ ... }]), so they became strings and the agent was skipped. sanitize now tracks [/{ nesting (quotes, comments and multi-line collections included) and only rewrites a flow value when text follows it, as in [Team] Does a thing. Other lines with a colon are left alone when they are already valid YAML.

One behavior change in the repair path: valid lines keep their YAML types instead of becoming strings (time: 12:30 is now 750, the same as when no repair runs). This also fixes key: |- # see: docs, which used to become the literal text |- # see: docs.

How did you verify your code works?

Unit tests in markdown.test.ts, an agent-loading test in agent.test.ts, and the issue's review.md/control.md via serve + debug agents --server: both agents load with example/chat#high. bun typecheck in core and bun run check pass.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@neriousy
fix(core): preserve yaml flow collections during frontmatter repair
82531a1
opencodejr[bot]
opencodejr Bot reviewed Nov 20, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good. I reproduced #65088 on the base with the issue's review.md/control.md (running serve from source with debug agents --server, because --standalone doesn't start from source): review was skipped because model became a string. With this PR both agents load with example/chat#high. The core config tests and typecheck:tsc pass.

I also compared edge cases on the base and the PR. [Tag] text, unquoted colons, URLs, block scalars and unclosed flow collections behave the same as before. Flow values followed by a # comment and quoted } inside a flow value now parse correctly.

Public API is unchanged: this only affects the frontmatter fallback repair.

No blocking concerns.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@neriousy
test(core): cover block scalar headers during frontmatter repair
4d882ee
opencodejr[bot]
opencodejr Bot reviewed Nov 20, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The new commit only moves the FlowState type and adds a test for |- # see: docs headers. My earlier review had no concerns to address. I re-checked the new head: the issue's review.md/control.md both load with example/chat#high (via serve + debug agents --server), and the core config tests and typecheck:tsc pass.

The public API is unchanged. No new concerns.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@neriousy
neriousy merged commit 7aed488 into dev Nov 20, 2026
12 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@neriousy
neriousy deleted the frontmatter-flow-repair branch November 20, 2026 09:38
@mv2sa mv2sa mentioned this pull request Nov 20, 2026
fix(core): preserve inline flow collections in frontmatter #65117
Closed
3 of 6 tasks
huuhabn pushed a commit to huuhabn/opencode that referenced this pull request Nov 20, 2026
@neriousy Huu Ha
fix(core): preserve yaml flow collections during frontmatter repair (a…
bc7895e
…nomalyco#65119)
@BrewTestBot BrewTestBot mentioned this pull request Nov 23, 2026
opencode 2.4.0 Homebrew/homebrew-core#327368
Merged
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
opencode 2.4.0 amrkmn/homebrew-tap#1251
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
feat: opencode release v2.4.0 sprisa/opencode-server#95
Merged
@kobzevvv kobzevvv mentioned this pull request Nov 24, 2026
chore(upstream): порт v2.4.1 — 67 в порт, 38 на решение gpt-mem/opencode-mem#223
Open
4 tasks
@scottames-github-bot scottames-github-bot Bot mentioned this pull request Nov 27, 2026
chore(deps): update ⬆️ mise-packages scottames/dots#1181
Merged
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

core: frontmatter repair turns valid flow collections into strings

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@neriousy
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.