You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: project-agent app saves ignore the version precondition and overwrite concurrent edits #3598
Reproduced locally on 44e0dcf254975286c0e9dea443b5cd1ca6b23347 with real services. No production testing.
updateProjectAgent owns a PROJECT_AGENT_STALE guard and REST forwards expectedUpdatedAt. The app route validates with projectAgentInputSchema, which does not declare that field and silently strips it; the app dialog also never sends the stamp. A stale full-form save overwrites newer names/instructions/equipment.
Steps:
Create a local project agent, read its config and updatedAt as writer B snapshot.
Writer A changes the name using REST PUT with that current expectedUpdatedAt; it succeeds.
Send B old full config plus an instruction edit and the old expectedUpdatedAt to REST PUT: 409 PROJECT_AGENT_STALE (control).
Send the exact same stale config/stamp to POST /api/app/projects/agents/: 200.
Read back agent: writer A newer name has reverted to B old name, while B instructions changed.
Expected: The app must carry the read version and forward it through schema validation; stale full replacements should be refused with a recoverable reload/merge path as REST already does.
Actual: The app strips a supplied precondition and silently clobbers a committed newer configuration.
Dedup: GitHub expectedUpdatedAt search returned no issue; agent concurrent configuration returned unrelated 152. Open agent PRs 3575/3577/3579/3569 cover other concerns.
Limits: Two sequential snapshots model two open editors against real local services. No sandbox run started; provider was a local mock and no secrets granted.
Acceptance:
App agent editor sends expectedUpdatedAt and app route preserves/validates it.
A stale app save returns PROJECT_AGENT_STALE without changing config, and the editor retains unsaved edits.
Activity