Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
4752915
feat(file-safety): atomic text publish primitive + safeWriteJson refa…
easonliang28 Aug 27, 2026
fcb7886
feat(task): per-task file observation registry (A2, #1375)
easonliang28 Aug 27, 2026
1b44bcb
feat(tools): guarded write CAS core with per-path FIFO chain (S4a, #1…
easonliang28 Aug 27, 2026
c7a9653
chore(ci): empty commit — re-trigger CI and the CodeRabbit current-he…
easonliang28 Aug 30, 2026
4ffa99f
fix(tools): address CodeRabbit review feedback (PR 1405)
easonliang28 Aug 30, 2026
bcf31c0
fix(file-safety): run verifyBeforeCommit before the backup rename, an…
Oct 6, 2026
38d9506
test(file-safety): cover a staging-file fsync failure
Oct 7, 2026
bd4dc00
chore: trigger a fresh review pass at this head
Oct 7, 2026
5210a75
fix(utils): refuse to publish a settings export through a symlink
Oct 7, 2026
87e240d
test(config): expect the export write to refuse symlink targets
Oct 7, 2026
bdd988b
fix(file-safety): keep the target mode, clean the staging dir, correc…
Oct 7, 2026
9daba58
fix(services): honour the creation mask for new targets and keep the …
Oct 7, 2026
b55f22d
fix(services): stop safeWriteText from resolving an already-guarded p…
Oct 7, 2026
b0e192a
fix(file-safety): publish credential writes without following a plant…
Oct 8, 2026
b177397
test(file-safety): pin that a partial DACL dump is unlinked after a f…
Oct 8, 2026
9908c21
fix(task): clear the per-task observation registry on disposal
Oct 8, 2026
4820172
fix(mcp): refuse a symlinked target for project-scoped settings writes
Oct 8, 2026
13429c0
fix(mcp,task): derive the symlink policy from the selected source; ma…
Oct 8, 2026
310a456
test(tools): cover the omitted kind argument in guardedWrite, and say…
Oct 8, 2026
23a2c27
fix(tools): stop a queued guarded write once its task has been aborte…
Oct 8, 2026
92beb1a
test(file-safety): cover parent-directory creation and its failure paths
Oct 9, 2026
2f239e2
style: format the MCP hub spec the way the repository formatter wants it
Oct 10, 2026
776f4af
test(mcp,task): make two test names say what their assertions check, …
Oct 10, 2026
a388860
test(read-file): check that both stats around a read ask for the bigi…
Oct 10, 2026
36a1bf5
test(guarded-write,safe-write): stop names and describe blocks claimi…
Oct 10, 2026
912de99
fix(tools): re-observe the published version and capture observations…
Oct 10, 2026
5a13667
style: format the four remaining files this PR touches
Oct 10, 2026
24e6225
test(guarded-write): drop orphaned comment fragment in the FIFO chain…
Oct 10, 2026
632a6cc
style(tools): drop imports unused after the main refresh (lint gate)
easonLiangWorldedtech Oct 16, 2026
8f11d3e
style(file-safety): drop SafeWriteTextOptions type import unused afte…
easonLiangWorldedtech Oct 16, 2026
e597652
chore(ci): retrigger checks (knip self-installer transient failure)
easonLiangWorldedtech Oct 16, 2026
afbd4b5
test(file-safety,mcp): pin the DACL fallback outcome and the deleteSe…
easonLiangWorldedtech Oct 16, 2026
6a48f36
refactor(editor): keep DiffViewProvider out of the guarded-write unit
easonLiangWorldedtech Oct 16, 2026
260b4a6
test(safety): cover the RollbackFailedError recovery contract
easonLiangWorldedtech Oct 22, 2026
ad7008d
chore: retrigger CI (Code QA run was not created for the knip entry c…
easonLiangWorldedtech Oct 22, 2026
e2689c7
chore: retrigger CI attempt 2
easonLiangWorldedtech Oct 22, 2026
6e2ff91
fix(tools): use the exact #1399 remediation texts and create on obser…
easonLiangWorldedtech Oct 22, 2026
9135e1a
style: apply prettier formatting to the guarded write spec
easonLiangWorldedtech Oct 22, 2026
f822308
test(safety): pin the DACL restore-failure commit rename and icacls c…
easonLiangWorldedtech Oct 22, 2026
bc75230
test(tools): cover the pre-commit non-ENOENT token failure
easonLiangWorldedtech Oct 22, 2026
5bcd965
test(safety): cover the ancestor-disappearance and non-Error rollback…
easonLiangWorldedtech Oct 22, 2026
4714caf
knip: declare the guarded-publish module as a workspace entry
easonLiangWorldedtech Nov 7, 2026
af27bce
fix(utils): keep the pre-commit ancestry assertion out of the EPERM r…
easonLiangWorldedtech Nov 8, 2026
b2c0a4b
fix(file-safety, utils): give each write its own staging name, and st…
easonLiangWorldedtech Nov 9, 2026
877a570
test(tools): run the guarded-write cancellation rows through Task's o…
easonLiangWorldedtech Nov 9, 2026
e9627b1
fix(export): notify the user when a settings export is refused
easonLiangWorldedtech Nov 9, 2026
5c32538
fix(safeWriteJson): synchronise the stage on the descriptor that wrot…
easonLiangWorldedtech Nov 13, 2026
74a5256
fix(config): carry the export failure to the user even when the notif…
easonLiangWorldedtech Nov 13, 2026
1e827eb
fix(task): re-adjudicate the s4a rebase onto main's architecture
Nov 28, 2026
23e112b
fix(utils): restore the symlink refusal the s4a rebase left half-ported
easonLiangWorldedtech Nov 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
"playwright-ct": false,
"workspaces": {
"src": {
"entry": ["extension.ts!", "extension/api.ts!", "workers/countTokens.ts!"],
"entry": [
"extension.ts!",
"extension/api.ts!",
"workers/countTokens.ts!",
"services/file-safety/safeWriteText.ts!",
"core/tools/guardedWrite.ts!"
],
"project": [
"**/*.ts!",
"!**/__tests__/**!",
Expand Down
286 changes: 254 additions & 32 deletions src/core/config/__tests__/importExport.spec.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 18 additions & 2 deletions src/core/config/importExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,26 @@ export const exportSettings = async ({ providerSettingsManager, contextProxy }:

const dirname = path.dirname(uri.fsPath)
await fs.mkdir(dirname, { recursive: true })
await safeWriteJson(uri.fsPath, { providerProfiles, globalSettings })
await safeWriteJson(uri.fsPath, { providerProfiles, globalSettings }, { refuseSymlinkTarget: true })
} catch (e) {
console.error("Failed to export settings:", e)
// Don't re-throw - the UI will handle showing error messages
// Don't re-throw - this route has no result object for the caller to report, so the
// notification happens here, the way the import route notifies through
// settings_import_failed below. A refusal to publish (a link at the chosen path the user
// never picked) is otherwise invisible: the dialog closes, the log line is not user-facing,
// and the file the user asked for does not exist. The writer's own message names the path it
// refused and the destination it would have written through, so the reason travels with the
// message.
const reason = e instanceof Error ? e.message : String(e)
try {
await vscode.window.showErrorMessage(t("common:errors.settings_export_failed", { error: reason }))
} catch (notificationError) {
// The route is awaited by webviewMessageHandler without a try of its own, so a notification
// channel that itself fails must not turn this swallowed write failure into a rejection the
// webview never sees. The console line above already names the write failure; this one names
// the notification that could not carry it.
console.error("Failed to notify the user about the export failure:", notificationError)
}
}
}

Expand Down
Loading
Loading