FS-118: protect project revisions before overwrite#9
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da6a05d4ad
ℹ️ 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".
| "releaseName": "Protected Project Revisions", | ||
| "fstrSchemaVersion": "0.1.0", | ||
| "gitCommit": "58edb71ce88b0060a8a2d9901664e91ac61dfcc2", | ||
| "gitCommit": "aefbd94dfbf31121e5831ad21b8cf6e54ff9fccc", |
There was a problem hiding this comment.
Stamp FS-118 with this commit SHA
For packages built from the reviewed commit, this manifest points provenance at aefbd94dfbf31121e5831ad21b8cf6e54ff9fccc, but the commit under review is 7099c4293b588801cb13e30fc4b93c30981010b8. getReleaseManifest() feeds the recovery UI, reports, saved .fstr metadata, and DXF package audit, so this would make FS-118 artifacts cite the wrong source revision; the new validation only checks for any 40-hex string, so it will not catch the mismatch.
Useful? React with 👍 / 👎.
| const activeColumns = columns.filter(column => { | ||
| const perFloorState = column?.activePerFloor; | ||
| if (perFloorState && Object.prototype.hasOwnProperty.call(perFloorState, floor.id)) { | ||
| return perFloorState[floor.id] !== false; | ||
| } | ||
| return column?.active !== false; | ||
| }).length; |
There was a problem hiding this comment.
Exclude floor-deleted columns from revision health
When a persisted project has entries in floor.deletedColumns, this summary still counts those columns as active on that floor. In the pre-overwrite path for an existing file that is not the currently loaded baseline, summarizePersistedProject() drives the stored health/delta, so a revision with slabs but fewer than two remaining supports can be labeled healthy and its active-column loss underreported in the recovery panel.
Useful? React with 👍 / 👎.
Summary
FS-118 protects a user's saved structural intent before FutolStructure overwrites an existing
.fstrfile. The release is deliberately based on the verified FS-117 production baseline and leaves structural analysis, model geometry, solver exporters, and the AutoCAD R12 writer logic unchanged.User impact and root cause
A normal save previously relied on the browser file and autosave paths without an immutable pre-overwrite history. If a floor, locked member, offset, cantilever, corner slab, or hidden/deleted state was lost before save, the newly written file could replace the last recoverable source. Browser autosave also had no last-known-healthy fallback when a current snapshot was corrupt or structurally implausible.
Implementation
saveProject(false)writes a child model revision..fstrdownload.Validation
node v3/tools/check-fs.js --no-browsernode v3/tools/check-fs.jsmodel-revision-*written with parentqa-protected-baseline.retention-5throughretention-54.Scope exclusions
No historical helper scripts, diaries, broad UI changes, solver changes, structural formulas, project source files, or original dirty-worktree files are included. The only DXF change is truthful app-build versus writer-build provenance; R12 entities, tables, geometry, and layering remain unchanged.
Rollback
Revert the FS-118 merge commit only. The known-good FS-117 production baseline is
fd0f69077be8328e267df83cb9b4eeeb1ada81c1.