Skip to content

docs(config): the shutdown configuration save, as of v6.3.0 (UltiTools-Reborn#510) - #97

Open
wisdommen wants to merge 2 commits into
alphafrom
docs/510-shutdown-save-only-changed-config
Open

wisdommen wants to merge 2 commits into
alphafrom
docs/510-shutdown-save-only-changed-config

Conversation

@wisdommen

Copy link
Copy Markdown
Member

Summary

Documentation companion to UltiKits/UltiTools-Reborn#512 (issue UltiKits/UltiTools-Reborn#510), written in the same session as the framework change per this repository's doc-sync workflow. Targets alpha deliberately: this describes 6.3.0 behaviour, which is not released yet.

docs/src/guide/essentials/config-file.md and its Chinese mirror:

  • the "Set and Save" promise is unchanged — a value set from code without save() is still saved on disable;
  • a new info callout, marked as of v6.3.0, says that a configuration the module did not change is no longer rewritten at shutdown, so edits a server owner made while the server ran survive a restart; that a configuration the module did change is still rewritten, with a WARNING when that overwrites an on-disk change; and that a file whose YAML could not be parsed is never rewritten;
  • a new warning callout describes the per-configuration lock: loading, saving, a panel write and the shutdown save of one configuration run one at a time, your own save() waits for whichever is in progress, and a module's own field changes are not covered by it;
  • the constructor warning now states the measured throwaway-instance counts (two per load, reload and panel write attempt, one per save(), one per configuration at shutdown) instead of "a throwaway instance" on three paths;
  • the discouragement tip and the SnakeYAML re-quoting note are aligned with the new behaviour.

No new <<< @/../examples/... reference and no version bump, so nothing here runs ahead of the released jar.

中文摘要

配合框架仓库 UltiKits/UltiTools-Reborn#512(issue #510)的文档同步,按仓库规定在同一会话内完成,目标分支为 alpha(该行为随 6.3.0 发布,尚未发版)。中英文页面同步更新:保留“设置后无需 save(),关服自动保存”的承诺;新增说明关服只写回被代码改动过的配置、覆盖磁盘改动时会有 WARNING、无法解析的文件不会被写入;新增每个配置的锁与其边界说明;并把“临时实例”改为实测的构造次数。

Verification

  • npm run build: build complete.
  • bash scripts/check-rendered-links.sh --clean: 不成立条数: 0.
  • find docs/src -name '*.md' -print0 | xargs -0 bash scripts/check-container-length.sh: exit 0 (the same command docs-ci.yml runs), re-checked after every edit; a deliberately over-long control file exits 1, so the check is doing something.
  • bash scripts/check-bilingual-parity.sh: OK on both locales.
  • Chinese page: 0 em dashes, bold well under the per-100-line budget.

wisdommen and others added 2 commits September 18, 2026 00:28
…v6.3.0 (UltiTools-Reborn#510)

The "Set and Save" tip still promises that a value set from code is
saved on disable. A new info callout, marked as of v6.3.0, adds that a
configuration the module did not change is no longer rewritten at
shutdown, so operator edits made while the server runs survive a
restart, and that a WARNING is logged when a code change overwrites
such an edit. The discouragement tip and the SnakeYAML re-quoting note
are aligned with the new behaviour. English and Chinese pages mirror
each other.

Companion to UltiKits/UltiTools-Reborn#510 (framework branch
fix/510-shutdown-save-only-changed-config). Targets alpha: this is
unreleased 6.3.0 behaviour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017BD9mGr6EsyRsEv3d2BizL
… as of v6.3.0 (UltiTools-Reborn#510)

The constructor warning now states the measured counts (two per load,
reload and panel write attempt, one per save(), one per configuration at
shutdown) instead of "a throwaway instance" on three paths.

A new warning callout describes the per-configuration lock added in
UltiTools-Reborn#510: loading, saving, a panel write and the shutdown
save of one configuration run one at a time, your save() waits for any
in progress, the throwaway construction happens under that lock, and a
module's own field changes are not covered by it.

The saving-on-disable callout adds that a file the framework could not
parse is never rewritten at shutdown and gets its own WARNING.

English and Chinese in parity; container-length, rendered-link and
bilingual-parity checks pass locally.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 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-09-20T05:49:14.484900Z b4827f1 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.

@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: b4827f122e

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

If your module did change it, the file is still rewritten, and a WARNING is logged when that write overwrites edits made to the file on disk; a file whose YAML the framework could not parse the last time it read it is never rewritten at all, and gets its own WARNING.
:::

::: warning Configuration writes hold a lock, as of v6.3.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.

P1 Badge Convert the warning titles to noun phrases

Both new warning headings—this English heading and 配置写入持有锁 in the Chinese mirror—are subject–verb clauses rather than noun phrases. Rename both, for example to “Configuration Write Locking” and “配置写入锁”, so the added containers follow the repository's required heading form in both locales.

AGENTS.md reference: AGENTS.md:L60-L73

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant