mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2547
Author: @qiuzan2001
Created: 10/15/2026
Status: ❌ Closed
Base:
main← Head:chief-serve/config-save-symlink📝 Commits (1)
d3416d2config save follows a symlinked run config and writes its target (#2256)📊 Changes
4 files changed (+46 additions, -2 deletions)
View changed files
📝
serve/runconfig.py(+6 -1)📝
serve/test_runconfig.py(+16 -0)📝
setup.py(+5 -1)📝
tools/test_setup_risk.py(+19 -0)📄 Description
Fixes #2256. Based on the patch @adolfotregosa attached to the issue (credited as co-author); the code change is
theirs, the tests are rewritten so the web-page test is its own method.
What it changes. In the container the server starts from
/opt/strata/strata-<model>.json, a symlink into thedata volume (
docker-entrypoint.sh, #1244). The web page's Model settings save (serve/runconfig.save) and setup'swrite_configwrote a temporary file andos.replaced it over the path, which replaced the link with a regularfile inside the image: the page said saved, the volume's file never changed, and a recreated container lost the
edit. Both now follow a symlink and write its target (
runconfig.savekeeps<name>.baknext to the target), andthe link stays a link.
What it leaves alone.
behind
path.is_symlink()).setup.write_configon a link into a folder that no longer exists replaces the link with a file, as before (itfollows only a link whose target's folder exists), so a setup run never fails where it used to succeed.
docker-entrypoint.shis unchanged. Aftersetup.py --setupit runscmp -s link cfg || cp -f link cfg; with thelink kept and pointing at
$cfg,cmpfinds the same file andcpdoes not run.mount given as
CONFIG=) now makes the save fail with the server's existing "the run config cannot be written"message, where before the edit silently went into the image layer.
How it was checked.
serve/test_runconfig.pyHttp.test_the_container_symlink_is_written_through_2256: the config is a link into a"volume" folder; a POST /config from the page writes the target, keeps the link, and leaves the
.bakbeside thetarget. Fails on
main(the target keeps temperature 0.7).tools/test_setup_risk.pyBrokenEarlierConfig.test_write_config_follows_the_container_symlink_2256: the samefor
write_config, plus a link into a missing folder (replaced by a file, as before). Fails onmain.python3 -m unittest serve.test_runconfig serve.test_security: OK.python3 tools/test_setup_risk.py: OK.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.