Repository navigation
Replies: 2 comments
|
web/AGENTS.md routes design proposals for web/ to Discussions, and this is a design question rather than a fix. @santifer, could you convert it to a discussion in the RFC category? Only a maintainer can do that. No code goes with it until the write boundary is decided. |
|
Thanks @rubicon: seven routes under |
Uh oh!
There was an error while loading. Please reload this page.
The web routes that edit user-layer files each do their own read, validate and write. On main today these routes under web/src/app/api write directly: cv, cv/ingest, followups/cadence, followups/log, portals, profile and runs/save. The template routes in #5962 and #5963 add three more (default, rename, file), and #5945 reads the same files.
Each route calls atomicWriteWithBackup or writeFileSync itself. The root scripts that own the same data, such as set-status.mjs for the tracker, go through a shared lock and their own validation. So a web write and a CLI write to the same file are not guaranteed to agree on locking, validation or backup behavior.
Related and closed: #5662 (profile and cadence routes rewrote profile.yml through yaml.dump) and #4496 (failed backups still allowed replacement). Both fixed one route at a time.
Proposal: decide whether web routes should write through a shared core write function, so locking, validation and backup live in one place. #5962 and #5963 keep their current atomicWriteWithBackup writes until that is decided.
This came up in review threads on #5962 and #5963 (CodeRabbit).
All reactions