Skip to content

Situla cannot persist configuration on Windows #253

Description

@dajiaohuang

Description

Situla cannot persist its configuration on Windows. The atomic writer derives the temporary filename with path.split("/"), but native Windows paths contain backslashes. The resulting basename still contains the absolute path, so writeFileSync receives an invalid path nested under the configuration directory.

Reproduction

Environment: Windows 11, Node.js v24.14.1, commit 0890278a6571e4190c1ab8cacd9becc147f74d9c.

cd python/01-tutorials/04-agentkit-tools/situla
npm ci --ignore-scripts
npm test

Two configuration tests fail with ENOENT while trying to open a path shaped like:

...\situla\.C:\...\situla\config.json.<pid>.<random>.tmp

The suite reports 79 passing and 2 failing tests. Both failures reach writeJsonAtomic through writeSitulaConfiguration.

Expected behavior

The temporary file should be created next to config.json, renamed atomically, and the configuration tests should pass on Windows as they do on POSIX systems.

Impact

The interactive configuration flow cannot save settings on a normal Windows checkout, so Windows users cannot complete the documented Situla setup.

Suggested fix

Use the platform-aware node:path basename helper when constructing the temporary filename, and keep a regression assertion that the writer leaves only the final configuration file behind.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions