From b046bc1687472fa44011ce32a5760d9af6d339dc Mon Sep 17 00:00:00 2001 From: Mikael Hugo Date: Sat, 2 May 2026 18:14:22 +0200 Subject: [PATCH] chore: clean up remaining sf-2 stale-name code comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Final sweep after the prompt + script + README sweep for stale repo references. These are pure code comments, not active behavior, but they mislead readers about what repo this code lives in: - src/resource-loader.ts: "sf-2 repo's working tree" → "sf-run repo's" - src/web/safe-import-meta-resolve.ts: example URL hostname - src/resources/extensions/sf/schemas/parsers.ts: dropped "sf-2 /" prefix - src/resources/extensions/sf/schemas/validate.ts: same - scripts/parallel-monitor.mjs: comment about "sf-2 repo itself" Tests intentionally not touched — the test fixtures use @sf-build as a generic scope name to exercise the symlink-merge logic, and the test tmpdir prefixes (sf-2821-, sf-2945-) are just numeric tags from issue numbers, not repo refs. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/parallel-monitor.mjs | 2 +- src/resource-loader.ts | 2 +- src/resources/extensions/sf/schemas/parsers.ts | 2 +- src/resources/extensions/sf/schemas/validate.ts | 2 +- src/web/safe-import-meta-resolve.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/parallel-monitor.mjs b/scripts/parallel-monitor.mjs index a0e0639fd..1388d29d7 100755 --- a/scripts/parallel-monitor.mjs +++ b/scripts/parallel-monitor.mjs @@ -276,7 +276,7 @@ function extractCostFromNdjson(mid) { // Auto-detect the SF loader path — works across npm global, homebrew, and local installs function findSfLoader() { - // 1. Check if we're running from inside the sf-2 repo itself + // 1. Check if we're running from inside the sf-run repo itself const repoLoader = path.resolve(import.meta.dirname, '..', 'dist', 'loader.js'); if (fs.existsSync(repoLoader)) return repoLoader; diff --git a/src/resource-loader.ts b/src/resource-loader.ts index fc7cc6790..29b9f2d2e 100644 --- a/src/resource-loader.ts +++ b/src/resource-loader.ts @@ -39,7 +39,7 @@ import { compareSemver } from "./update-check.js"; // Resolve resources directory — prefer dist/resources/ (stable, set at build time) // over src/resources/ (live working tree, changes with git branch). // -// Why this matters: with `npm link`, src/resources/ points into the sf-2 repo's +// Why this matters: with `npm link`, src/resources/ points into the sf-run repo's // working tree. Switching branches there changes src/resources/ for ALL projects // that use sf — causing stale/broken extensions to be synced to ~/.sf/agent/. // dist/resources/ is populated by the build step (`npm run copy-resources`) and diff --git a/src/resources/extensions/sf/schemas/parsers.ts b/src/resources/extensions/sf/schemas/parsers.ts index e0e36530b..88e4a02d4 100644 --- a/src/resources/extensions/sf/schemas/parsers.ts +++ b/src/resources/extensions/sf/schemas/parsers.ts @@ -1,4 +1,4 @@ -// sf-2 / Deep planning mode — Markdown → structured object parsers for artifact validation. +// Deep planning mode — Markdown → structured object parsers for artifact validation. // // Each parser converts a markdown artifact into a typed object suitable for // JSON Schema validation. The parsers are intentionally minimal — they only diff --git a/src/resources/extensions/sf/schemas/validate.ts b/src/resources/extensions/sf/schemas/validate.ts index fa736886f..edbf4d952 100644 --- a/src/resources/extensions/sf/schemas/validate.ts +++ b/src/resources/extensions/sf/schemas/validate.ts @@ -1,4 +1,4 @@ -// sf-2 / Deep planning mode — Artifact validator entry point. +// Deep planning mode — Artifact validator entry point. // // Validates PROJECT.md, REQUIREMENTS.md, and per-milestone ROADMAP.md // against the contract spec in .planning/phases/11-deep-planning-mode/11-CONTRACTS.md. diff --git a/src/web/safe-import-meta-resolve.ts b/src/web/safe-import-meta-resolve.ts index 1ff96aaa4..1bfc3bd62 100644 --- a/src/web/safe-import-meta-resolve.ts +++ b/src/web/safe-import-meta-resolve.ts @@ -5,7 +5,7 @@ import { fileURLToPath } from "node:url"; * Derive a package root from an import.meta.url, returning null on failure. * * The Next.js standalone build bakes import.meta.url as the CI runner's - * absolute path (e.g. file:///home/runner/work/sf-2/sf-2/src/web/bridge-service.ts). + * absolute path (e.g. file:///home/runner/work/sf-run/sf-run/src/web/bridge-service.ts). * On Windows, fileURLToPath() rejects this Linux path with * "File URL path must be absolute". *