Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 1dc23814741e45b2a45238eb4c354eca
Branch: dev/1-preflight-symlink-entry
Base: bab1fe9
At: 2026-11-24T08:51:01Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.
Written-by: FlyBot Lead
Bot: FlyBot Dev-1
Read against live main bab1fe963b65913f5cd1021d30e6598a7f571627 (GitHub Date: Tue, 24 Nov 2026 08:49Z).
What is wrong today, in one user sentence: when the checkout is reached through a symlink (a worktree directory linked into place, or a path that crosses one), the bench preflight silently does nothing and exits 0 — so bench.sh walks straight past the gate #3360 hardens and dies later in the shell exactly as before, with no line saying the preflight was skipped.
Readings at bab1fe96:
core/dev/bench-preflight.mjs:84-86— the CLI entry point is guarded by identity of the script URL:if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { process.exit(main()) }
import.meta.urlis the resolved module URL, whilepathToFileURL(process.argv[1])keeps whatever path the shell passed. Reached through a symlink the two never match, somain()never runs, the process exits 0, andproblemLine(...)is never printed.core/dev/bench.sh:90— the caller is exactly that shape:node "$PLUGIN/dev/bench-preflight.mjs" "$DSH_HARNESS" || exit 1.$PLUGINcomes fromdirname "$0", so any symlinked component in the invocation path reaches the guard above unchanged.core/test/bench-preflight.test.js:97-128— the fixture already builds a checkout-shaped tree and spawns/bin/sh bench.sh(:124) with abin/of symlinks (:108symlinkSync(process.execPath, join(bin, 'node'))); it never exercises a symlinked script path, which is why this stays green today.
Red first
In core/test/bench-preflight.test.js:
- Build the same checkout-shaped fixture, but invoke the script through a symlink:
symlinkSync(join(root,'core','dev','bench-preflight.mjs'), join(root,'linked-preflight.mjs')), thenspawnSync(process.execPath, [join(root,'linked-preflight.mjs'), harnessMissingATool])→ expectstatus === 1and stderr naming the missing tool. Today:status === 0, empty stderr (the guard is false). - Run
bench.shwith$PLUGINreached through a symlinked directory and aPATHthat lacks the tool → expect the bench home is not created (the preflight refuses first). Today it proceeds past the preflight.
Expected shape of the fix: compare the resolved paths (realpathSync(argv[1]) against fileURLToPath(import.meta.url)) and treat an unreadable argv[1] as "not the entry point" without throwing; keep the module import side-effect free.
Scope
May touch: core/dev/bench-preflight.mjs (:84-86 only), core/test/bench-preflight.test.js, docs/** if arch-docs asks for a line, changelog.d/<issue>.fixed.md, and the generated mirror under patches/ds-bot/ if topics.json assigns core/dev/** (regenerate, never hand-edit).
Must not touch: the missing-tool state and bench.sh ordering that open #3362 is changing (branch from the new main once it lands, or keep to :84-86 if it has not); core/src/**, core/client.js, plugins/**.
Dedupe
repo:ThinkFlowLab/FlyBot bench preflight → 0 issues before #3360; #3360 is the missing-tool state, a different hunk of the same file (:54-70 + bench.sh ordering). No issue mentions the symlink entry-point guard (symlink, pathToFileURL, realpath → 0 hits against core/dev/bench-preflight.mjs).
Activity
Birfy commentedon Nov 25, 2026
基于已退役布局关闭(关闭原因,非验收结论)
d8898cad(2026-11-25T12:20:16Z,2156 blobs)d8898cad上不存在