Skip to content

fix(fork): tolerate trailing newline in CLAUDE.md symlink target - #1

Merged
NoahHendrickson merged 1 commit into
customfrom
claude/fork-sync-upstream-automation-45iqnc
Jul 25, 2026
Merged

fix(fork): tolerate trailing newline in CLAUDE.md symlink target#1
NoahHendrickson merged 1 commit into
customfrom
claude/fork-sync-upstream-automation-45iqnc

Conversation

@NoahHendrickson

Copy link
Copy Markdown
Owner

What Changed

One-line fix in apps/web/src/__fork_guards__/forkWorkflowDocs.test.ts: compare the CLAUDE.md symlink target with .trim() instead of exact equality.

Why

The committed symlink blob stores its target as AGENTS.md\n — with a trailing newline — so readlinkSync returns the newline and the guard's exact-equality assertion failed CI on custom (run #5, the only red among 1,552 tests). The guard's intent is "CLAUDE.md stays aliased to AGENTS.md", which a trailing newline does not violate.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes (n/a — no UI change)
  • I included a video for animation/interaction changes (n/a)

🤖 Generated with Claude Code

https://claude.ai/code/session_016E6gPagVLG6sNoupF89sXu


Generated by Claude Code

The committed symlink blob stores 'AGENTS.md\n'; compare trimmed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016E6gPagVLG6sNoupF89sXu
@cursor

cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS labels Jul 25, 2026
@NoahHendrickson
NoahHendrickson merged commit ed868ed into custom Jul 25, 2026
10 checks passed
@NoahHendrickson
NoahHendrickson deleted the claude/fork-sync-upstream-automation-45iqnc branch July 25, 2026 16:25
NoahHendrickson added a commit that referenced this pull request Jul 26, 2026
… all packaged builds

Review finding #1: the base-directory fork was one environment variable
deep. T3CODE_HOME=~/.t3 skipped the fork default entirely — and the
server child resolves the same variable itself, with precedence over
the bootstrap t3Home — putting both halves back on the real app's live
state.sqlite, read-write. Non-development builds (and packaged builds
unconditionally) now refuse to start when the resolved base is
upstream's own ~/.t3, with an actionable message. Any other explicit
override remains a deliberate, self-consistent choice and still works.

Review finding #7: the fork-base condition keyed on isDevelopment
(VITE_DEV_SERVER_URL) while its comment claimed "packaged". A packaged
build launched with a dev URL resolved baseDir=~/.t3 and shared caches/
and worktrees/ with the real app. The condition now keeps only an
unpackaged development run on ~/.t3; packaged builds stay fork-owned
regardless of environment.

Review finding #8: "T3 Code (Fork)" is documented as a deliberate
never-matching sentinel so nobody "fixes" it to a name that would arm
the legacy-directory migration back door.

Guards: the vacuous-prone string assert is updated for the new
condition, and the refusal's existence is pinned; the behavioral
assertions (refusal fires for ~/.t3, custom homes still work, packaged
dev-URL builds stay fork-owned) live in DesktopEnvironment.test.ts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
NoahHendrickson added a commit that referenced this pull request Jul 28, 2026
…t, named port

Review round 1 (PR #32). The two blocking items and the decided ones:

Guard rewritten so it can actually fail (review #1, #6a). Source
assertions now run against the extracted fork:begin/end hunks and pin the
subscription's input expressions and the derived port — the reviewer's
mutation table (threadId: null, devServerPort = null, = 5173) now fails
the suite, replayed and confirmed. The meta component is asserted on
rendered output (attribute presence/absence, sr-only copy and ordering,
and the `> svg` direct-child contract the stylesheet depends on — wrapping
the icon now fails). CSS is read through cssRules.ts, so a
behaviour-identical declaration swap passes where it used to fail.

Manifest cost paragraph corrected (review #2): upstream's v1 row already
makes this exact per-row subscription unconditionally, so v2 gaining it is
parity, not a new class of cost. The per-environment multiplier (M
environments → M streams, each host polling) is now disclosed instead of
hidden behind "N rows share one stream". The lsof-fallback degradation
(probe failure → terminal: null everywhere → pulse permanently off,
silently) and the 1MiB truncation flicker are recorded as known
limitations next to the external-shell one (review #5).

The port is named, "dev server" dropped (review #3, #4): the row tooltip
now carries `localhost:<port>` (+n overflow), v1's exact copy, and the
accessible text says "Server listening on port N" — what the scanner
actually knows — placed after the branch name so identity precedes
transient state (review #6c).

Slim rows no longer subscribe (Cursor review): the hook input is gated on
variant === "card", so settled/snoozed rows pass null and skip the
subscription instead of retaining the scanner for rows that cannot pulse.

The repaint cost of animating a non-compositing property is now a stated
yes in the stylesheet rather than an accident (review #6d). Globe2Icon
imports as its own fenced statement because the phosphor guard parses
upstream's import braces and a fence inside them reads as a binding.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants