Skip to content

Studio: keep comments in the OpenCode config unsloth start writes - #14539

Closed
NilayYadav wants to merge 2 commits into
unslothai:mainfrom
NilayYadav:opencode-jsonc-keep-comments
Closed

NilayYadav wants to merge 2 commits into
unslothai:mainfrom
NilayYadav:opencode-jsonc-keep-comments

Conversation

@NilayYadav

Copy link
Copy Markdown
Collaborator

unsloth start opencode --app rewrote ~/.config/opencode/opencode.jsonc as plain JSON, so every // and /* */ comment in it was lost. The command asks to be re-run after loading another model, and each re-run dropped any comment added since. The settings themselves were kept. Comments in openclaw.json were lost the same way with unsloth start openclaw --app.

Now only the Unsloth provider entry, plus the enabled or disabled provider lists when they need a change, is written into the existing file. Comments, trailing commas, layout and the other providers stay as they were. A file that cannot be updated in place still gets the old full rewrite.

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

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-21T22:02:46.572715Z 2e5b67b Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: d36991b061

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 2e5b67b5d0

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen added a commit that referenced this pull request Oct 21, 2026
Follow-up to #14561.
`test_block_dequant_is_checked_for_its_peak_intermediates[mxfp8]` failed
again on #14539's Backend CI `(Python 3.13, a-k)` run (job
119508973440). That base already had #14561's least-of-three readings:

```
E   AssertionError: ([50331648, 50331648, 50331648], 57405440)
E   assert ([50331648, 50331648, 50331648] and 50331648 >= (0.9 * 57405440))
```

The smallest of three readings was still about 7 MB above the charge, so
the extra memory is not a one-off spike. It is steady for the life of
that pytest worker. The product's estimate is not the problem: the same
torch (2.10.0+cpu, Python 3.13) measured alone gives charge / growth of
0.98 to 1.07 for both formats at 1, 2, 4 and 8 torch threads. A raised
glibc mmap or trim threshold does not reproduce it either. What differs
in CI is the worker's history: thousands of earlier tests, their threads
and their allocator state all count toward the process-wide `RssAnon`
this test reads.

## Change

The measurement runs in a fresh `python -c` subprocess: same tensors,
same sampler, same least of three, same 0.9 bar. The parent test only
checks the JSON the child prints. Nothing else lives in that process, so
the reading is the dequant's own.

## Testing

- Both parameters pass in three back-to-back runs. The whole
`test_diffusion_comfy_block.py` file passes: 55 passed, 5 skipped.
- Sabotage: charging only the bf16 output, dropping `chunk * per_row` in
`diffusion_comfy_block.py`, fails both formats (`[33554432] vs 47.9 MB /
51.1 MB`).

This failure did not reproduce locally, so the subprocess is aimed at
the one variable that differs from a clean run, rather than at a
confirmed allocator mechanism.
@danielhanchen danielhanchen self-assigned this Oct 22, 2026
@danielhanchen

Copy link
Copy Markdown
Member

Thank you for the PR and for tracking this down! The same problem was fixed on main in #14591 (cb2590f), which landed after this branch was cut: unsloth start opencode --app and unsloth start openclaw --app now update the existing file in place and keep its comments. Your tests from this PR pass unchanged on current main, and the PR now conflicts with that implementation in both files, so I'm closing this one. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants